I was wondering if it was possible to create a 2 dimensional array to show images (like tiles) to learn more about them.
At the moment I have what I thought would work but all it ouputs is “Array”.
<?php
$bl = "<img src='images/black.png' alt='Black'>";
$wh = "<img src='images/white.png' alt='White'>";
$page = array( array( "$bl", "$wh", "$wh", "$bl")
);
echo $page;
?>
Hopefully someone can help me.
EDIT:
I’ve found I can output want I’ve wanted with:
echo "$bl$bl$bl$bl$bl$bl$bl$bl$bl$bl<br>";
echo "$bl$wh$wh$wh$wh$wh$wh$wh$wh$bl<br>";
echo "$bl$wh$wh$wh$wh$wh$wh$wh$wh$bl<br>";
echo "$bl$wh$wh$wh$wh$wh$wh$wh$wh$bl<br>";
echo "$bl$wh$wh$wh$wh$wh$wh$wh$wh$bl<br>";
echo "$bl$wh$wh$wh$wh$wh$wh$wh$wh$bl<br>";
echo "$bl$wh$wh$wh$wh$wh$wh$wh$wh$bl<br>";
echo "$bl$wh$wh$wh$wh$wh$wh$wh$wh$bl<br>";
echo "$bl$bl$bl$bl$bl$bl$bl$bl$bl$bl";
But this seems rather messy. I’d like the array to work.
I have my server up too. You can view the above code and the ouput of the array at http://wizzo.mine.nu/tile.php but it might not be on all the time.
Thankyou.