Reply
Not displaying whole field
Old 06-01-2008, 07:23 PM Not displaying whole field
Extreme Talker

Posts: 214
I am trying to set alt tags with PHP. When I use this code
PHP Code:
echo "<img src=" $row['image'] . " alt=".$row['name'].">"
It outputs the first word of 'name' but wont output the whole field. I remember seeing a command to force the entire field to be displayed but I cant remember what it is now.
__________________
DVD Movie Release Database: http://www.couchpotatoesonline.com
Truly is offline
Reply With Quote
View Public Profile
 
When You Register, These Ads Go Away!
     
Old 06-01-2008, 07:42 PM Re: Not displaying whole field
vn5ltr's Avatar
Skilled Talker

Posts: 95
Location: Melbourne, Australia
You are not including the quotation marks in the html itself. Escape them and then close off the php string like so:

PHP Code:
echo("<img src=\"" $row['image'] . "\" alt=\"".$row['name']."">"; 
vn5ltr is offline
Reply With Quote
View Public Profile
 
Reply     « Reply to Not displaying whole field
 

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off




   
RSS Feed  Feeds: RSS   JS   XML
RSS Feed  Feeds for this forum: RSS   JS   XML

 


Page generated in 0.11019 seconds with 13 queries