Confused about foward slashes
Posted: Mon Jun 30, 2003 10:33 am
I am getting very confused with the issue of forward slashes in variables. In my application I have something like this, which works fine:
$poo="images/ad/";
$oop="ad1.gif";
for($x=0;$x<=10;$x++)
{
$z=$poo.$oop;
echo "z = ".$z."<br>";
echo "<img src=\"$z\">";
}
When I look at the new variable $z I get a pathname and filename. When I put these into HTML (from with <?php .. ?> ), as ;
echo "<img statement as the src=\"$z\">";
it isn't even echo'd
Can anyone tell me what is wrong ?
Many thanks
$poo="images/ad/";
$oop="ad1.gif";
for($x=0;$x<=10;$x++)
{
$z=$poo.$oop;
echo "z = ".$z."<br>";
echo "<img src=\"$z\">";
}
When I look at the new variable $z I get a pathname and filename. When I put these into HTML (from with <?php .. ?> ), as ;
echo "<img statement as the src=\"$z\">";
it isn't even echo'd
Can anyone tell me what is wrong ?
Many thanks