Well, as long as you use double quotes: " the variables will be parsed
inside you statement... single quotes however mean the exact string...
$icon = "1.jpg";
$str = "this is the image $icon";
$str2 = 'this is the image $icon';
print $str; // returns: "this is the image 1.jpg"
print $str2; // returns: "this is the image $icon"
----- Original Message -----
From: "Andy" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Saturday, February 16, 2002 6:03 PM
Subject: [PHP] Tricky variable question! Impossible??
> Hi guys,
> I am not sure if this is possible. Not on my knowledge, but maybe someone
> smarter than I am :-)
> I want to pass an icon to a function. Therefore I am putting all the html
> into a var called icon.
> Inside this html their is another variable with an array which value is
> inside the function.
> How can I pass this html thing and ensure that the variable is gonna be
> Take a look at the code underneath.
> Like that it is just printing out $picture_id[$i]
> $icon_1 = " <a href=\"index.php?fuseaction=edit&action=delete&id=%s\"
> onclick=\"return confirm('Are you sure you want to delete picture
> <img src=\"../app_global/pics/delete.gif\" width=20 height=20
> Can anybody help on this?
> Thanx for any help
> Cheers Andy
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php