Well, as long as you use double quotes: " the variables will be parsed inside you statement... single quotes however mean the exact string...
example: $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" Greets, Edward ----- 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 is > 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 set > inside the function. > > How can I pass this html thing and ensure that the variable is gonna be set? > 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 no: > $picture_id[$i]');\"> > <img src=\"../app_global/pics/delete.gif\" width=20 height=20 border=0 > alt=\"delete\"> > </a>"; > > 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