Sorry for this question to be a ‘can you fix it’ one, but this little bit of code has been confusing me for a while now.
I’m basically making a table with a bunch of rows and columns and in each one I have a slightly changing SQL query. To make it a bit easier instead of typing all that out I made this bit of script but it is starting to get a bit complicated so can any of you manage to get it correct?
echo '<td background='images/map/'; $tile = mysql_fetch_array(mysql_query('SELECT image FROM map WHERE horizontal = ${'mapPiece' . $mapPieceCount . [0]} AND verticle = ${'mapPiece' . $mapPieceCount . [0]}')); echo $tile[0]; echo '.png'></td>';
Thanks, Stanni
Assuming I interpreted this right, the [0] needs to go outside of the curly braces: