Well, the string concatenation can be used to force PHP read and print a variable within a echoed or printed string. As far as I know, it should be used to make PHP handle a function inside a string. i.e.
echo "your total is:". total_function(); In your example, you might use as well: echo "<img src=\"../site/products/" . $prod_sku.gif . "\"; having the same results. Notice how the HTML part is always enclosed by quotes. PHP server reads this as: echo "<img src=\"../site/products/whatever.gif\"; Hope this works, C. > -----Original Message----- > From: Jen Swofford [mailto:[EMAIL PROTECTED]] > Sent: Sunday, July 07, 2002 2:31 PM > To: [EMAIL PROTECTED] > Subject: [PHP-DB] concatenating (was: RE: [PHP-DB] Retrieving/Displaying > hyperlinked images with PHP) > > Can somebody explain to me the rule on concatenating? So far, I haven't > had > to use those mysterious-looking dots. ;) My code goes like this: > > echo "<td><img src=\"../site/products/$prod_sku.gif\" > border=0></td></tr>"; > > Does it work because I'm lucky? Honestly I haven't been impressed with > the > documentation I've found online. > > Jen Swofford > [EMAIL PROTECTED] > > > [snip] > > // Then show image and/or details > > echo "<img src=/image_folder/".$row[product_image].">"; > > [snip] > > > > -- > PHP Database Mailing List (http://www.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php