I’m trying to create an array from the data pulled from my database. I want the array to be arranged like the example shown below:
Example:
$code_sections = array (
‘Player Setup’ => ‘player_setup’,
‘Land Generation’ => ‘land_generation’,
‘Elevation Generation’ => ‘elevation_generation’,
‘Cliff Generation’ => ‘cliff_generation’,
‘Terrain Generation’ => ‘terrain_generation’,
‘Connection Generation’ => ‘connection_generation’,
‘Object Generation’ => ‘object_generation’,
);
The data I’m trying to pull from the database is sorted in the following way:
Is there a way to arrange it like shown in the example?