Here is a weird question. I am building an array of objects manually, like this:
$pages_array[0]->slug = \"index\";
$pages_array[0]->title = \"Site Ind
If you make them arrays with named keys rather than objects, you can do it like this:
$pages_array = array(
array(
'slug' => 'index',
'title' => 'Site Index',
'template' => 'interior'
),
array(
'slug' => 'a',
'title' => '100% Wide (Layout A)',
'template' => 'interior'
),
array(
'slug' => 'homepage',
'title' => 'Homepage',
'template' => 'homepage'
)
);
You can combine this with Fanis' solution and use the slugs as the keys if you like.