Page 1 of 1

2 variables together

Posted: Sat Jan 22, 2005 11:15 pm
by bst82551
I'm trying to make one variable integrate into another, sorta. Well, Ok.

something like this:

Code: Select all

$img + com = $imgcomm;
com is supposed to be a text string added on after $img is shown. The final output if $imgcomm were echoed should be something like this:

image.jpgcom << image.jpg = $img, by the way:-).

Brian

Posted: Sat Jan 22, 2005 11:19 pm
by feyd

more problems

Posted: Sat Jan 22, 2005 11:31 pm
by bst82551
same script, what's wrong with this code right here?! It's supposed to echo $image.jpg

$image.jpg is in comments.php

Code: Select all

<?php

include 'comments.php';
echo '$&#123;$img&#125;';

?>
Brian

Posted: Sat Jan 22, 2005 11:37 pm
by feyd
single quotes vs. double quotes: single quote strings do not parse variables. Double quote stirngs do.

Posted: Sat Jan 22, 2005 11:40 pm
by bst82551
never mind... it was a problem with comments.php that i overlooked.

Brian