Tycoon Talk
Become a Big fish!
The number 1 forum for online business!
Post topics, ask questions, share your knowledge.
Tycoon Talk is part of Freelancer.com - find skilled workers online at a fraction of the cost.

PHP Forum


You are currently viewing our PHP Forum as a guest. Please register to participate.
Login



Freelance Jobs

Reply
Not displaying whole field
Old 06-01-2008, 07:23 PM Not displaying whole field
Truly's Avatar
Ultra Talker

Posts: 322
Trades: 0
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:
Please login or register to view this content. Registration is FREE
Truly is offline
Reply With Quote
View Public Profile
 
 
Register now for full access!
Old 06-01-2008, 07:42 PM Re: Not displaying whole field
vn5ltr's Avatar
Skilled Talker

Posts: 93
Location: Melbourne, Australia
Trades: 0
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 Search this Thread
Search this Thread:

Advanced Search

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

BB 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.11138 seconds with 12 queries