hello quasipickle,
you said
'What does it look like when you print_r()
$posts
in the controller?'
it dumps out all the class info for
Phalcon\Mvc\Model\Resultset\Simple Object
and the toArray() makes it print out
Array ( [0] => Array ( [post_id] => 1 [user_id] => 1 [text] => hi ) [1] => Array ( [post_id] => 2 [user_id] => 1 [text] => hello ) ) 1
what is object syntax?
Looks pretty good. What does it look like when you print_r()
$posts
in the controller?
Also, as an aside - why are you running your resultset through toArray()
? Looking at your Volt code - you could just as easily use object syntax, and you wouldn't have the overhead of the translation.