before asking this question i have been looking at these 2 posts but i can't seem to find the answer:
Using PHP variables inside HTML tags?
how do use php variable in html?
I want to create a simple script that displays images with different links using values stored in variables but my script is not working.
<?php
$array = array(
"http://yahoo.com",
"http://bing.com",
);
for ($val = 0; $val<2; $val++) {
$b1 = "<a href='{$array[$val]}' target="_blank"><img src="./$val/1.jpg" alt="image here" title="Title"></a>";
print $b1;
}
?>
I apologize in advance, pretty sure it's a really dumb question but i really can't find a solution by myself...
Thanks!