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
This code
$pages_array[1]->slug = "a";
is invalid anyways - you'll get a "strict" warning if you don't initialize the object properly. So you have to construct an object somehow - either with a constructor:
$pages_array[] = new MyObject('index', 'title'....)
or using a stdclass cast
$pages_array[] = (object) array('slug' => 'xxx', 'title' => 'etc')