smartalco Posted June 29, 2007 Share Posted June 29, 2007 im getting the parse error 'Parse error: parse error, expecting `']'' in /usr2/web/alumni/tigercubs/almost_index.php on line 108' on this line <a href="' . $all[$k[0[picture]]] . '"><img src="' . $all[$k[0[picture_t]]] . '" alt="' . $all[$k[0[name1]]] . '" width="133" height="100"></a><br /> the array that those variables belong to looks like this (don't ask why the goofy formatting,its a combination of things, just live with it) Array ( [0] => Array ( [0] => Array ( [0] => 1 [id] => 1 [1] => picture1.jpg [picture] => picture1.jpg ) ) [1] => Array ( [0] => Array ( [0] => 2 [id] => 2 [1] => picture2.jpg [picture] => picture2.jpg ) ) ) does anyone know why im getting this error :/ (I have checked, more than once, there are no unclosed brackets before or after that line, and yes i know that the variables called in the code aren't in the array i just showed you, but I didn't want to spam the board with a massive array) Link to comment Share on other sites More sharing options...
smartalco Posted June 29, 2007 Author Share Posted June 29, 2007 nvm, got it to work, i was using a C like syntax, which wasnt quite right >_> Link to comment Share on other sites More sharing options...
justsomeguy Posted June 29, 2007 Share Posted June 29, 2007 That's definately not C syntax, it's also not PHP syntax.For those following along at home, something like this:$all[$k[0[picture]]]should be written like this:$all[$k][0]['picture']..which turns out to be both C-style and PHP syntax Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.