PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!
Moderator: General Moderators
bst82551
Forum Newbie
Posts: 15 Joined: Wed Dec 29, 2004 12:25 pm
Location: Huntsville, Texas
Post
by bst82551 » Sat Jan 22, 2005 11:15 pm
I'm trying to make one variable integrate into another, sorta. Well, Ok.
something like this:
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
feyd
Neighborhood Spidermoddy
Posts: 31559 Joined: Mon Mar 29, 2004 3:24 pm
Location: Bothell, Washington, USA
Post
by feyd » Sat Jan 22, 2005 11:19 pm
bst82551
Forum Newbie
Posts: 15 Joined: Wed Dec 29, 2004 12:25 pm
Location: Huntsville, Texas
Post
by bst82551 » Sat Jan 22, 2005 11:31 pm
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 '${$img}';
?>
Brian
feyd
Neighborhood Spidermoddy
Posts: 31559 Joined: Mon Mar 29, 2004 3:24 pm
Location: Bothell, Washington, USA
Post
by feyd » Sat Jan 22, 2005 11:37 pm
single quotes vs. double quotes: single quote strings do not parse variables. Double quote stirngs do.
bst82551
Forum Newbie
Posts: 15 Joined: Wed Dec 29, 2004 12:25 pm
Location: Huntsville, Texas
Post
by bst82551 » Sat Jan 22, 2005 11:40 pm
never mind... it was a problem with comments.php that i overlooked.
Brian