Don't close and re-open php tags, remove unneeded spaces

To close and re-open php tags makes no sense if there's nothing between them
Swap array keys and values

Non-hardcoded keys may be not unique