Tried searching, not sure if using right words.
Ok so I want to pass every announcements paired with each announcements multiple comments to a template in 1 varia开发者_如何转开发ble (so I dont have to put business logic there). Any ideas how to do this?
Heres what I have so far: http://pastebin.com/JvKXtB5a
Getting errors.
Regarding the error, you're making an array as an index to an array, you can't do that. What you're doing in something like:
$annoucementarray = array('value'); // assuming this is the value
$tmparray = array($annoucementarray => 'test'); // Warning: Illegal offset
You cannot use an array as an index, in your case you want $annoucementarray
to be the index of a new array assigned to $tmparray
.
精彩评论