Current location: Hot Scripts Forums » Programming Languages » PHP » The right place to put my Quotes?


The right place to put my Quotes?

Reply
  #1 (permalink)  
Old 05-03-04, 07:50 PM
move3rd move3rd is offline
Newbie Coder
 
Join Date: Mar 2004
Posts: 20
Thanks: 0
Thanked 0 Times in 0 Posts
The right place to put my Quotes?

Hi,

The code below is causing a parse error. Where am I going rong?
PHP Code:

while ($row mysql_fetch_array($result)) { 


  
//Create variables for use in template class 
$table_track_list '<table width=\"363\" cellpadding=\"5\" cellspacing=\"1\" ><tr><td>'.$row['track_num']; 
$table_track_list .= $row['track_title'].'</td><td><form action=\"edit_track.php\" method=\"POST\">'
$table_track_list .= '<input type=\"hidden\" name=\"track_title\" value=\"'.$row['track_title'].'\">'
$table_track_list .= '<input type=\"hidden\" name=\"track_num\" value=\"'.$row['track_num'].'\">'
$table_track_list .= '<input type=\"hidden\" name=\"artist\" value=\"'.$row['artist'].'\">'
$table_track_list .= '<input type=\"hidden\" name="cd_title\" value=\"'.$row['cd_title'].'\">'
$table_track_list .= '<input name=\"POST\" type=\"submit\" value=\"Edit\"></td></tr></table>'
                                          }
//End While Statment 
Thanks
Reply With Quote
  #2 (permalink)  
Old 05-03-04, 08:23 PM
rec0n rec0n is offline
Newbie Coder
 
Join Date: Feb 2004
Location: Earth
Posts: 98
Thanks: 0
Thanked 0 Times in 0 Posts
what is the full error message?

ps. ' \" ' <-- you don't have to do that unless it's the same as the outside quote

' \' ' # single inside single
' " ' # double inside single
" \" " # double inside double
" ' " # single inside double
__________________
-- my bad lol
Reply With Quote
  #3 (permalink)  
Old 05-04-04, 02:29 PM
move3rd move3rd is offline
Newbie Coder
 
Join Date: Mar 2004
Posts: 20
Thanks: 0
Thanked 0 Times in 0 Posts
Question

Thanks,

I re-wrote it the code:
PHP Code:

while ($row mysql_fetch_array($result)) { 

    
//Create variables for use in template class 
    
$table_track_list '<table width="363" cellpadding="5" cellspacing="1">' 
        
'<tr><td>' $row['track_num'] . ' - ' $row['track_title'] . '</td><td>' 
        
'<form action="edit_track.php" method="POST">' 
        
'<input type="hidden" name="track_title" value="' $row['track_title'] . '">' 
        
'<input type="hidden" name="track_num" value="' $row['track_num'] . '">' 
        
'<input type="hidden" name="artist" value="' $row['artist'] . '">' 
        
'<input type="hidden" name="cd_title" value="' $row['cd_title'] . '">' 
        
'<input name="POST" type="submit" value="Edit">' 
        
'</td></tr></table>'

It's only outputing 1 row?
Reply With Quote
  #4 (permalink)  
Old 05-04-04, 02:48 PM
rec0n rec0n is offline
Newbie Coder
 
Join Date: Feb 2004
Location: Earth
Posts: 98
Thanks: 0
Thanked 0 Times in 0 Posts
oh you will need to add a . before the =.

$table_track_list = "start my data";
while (...) {...
$table_track_list .= "give me more data";
}...
print $table_track_list;

outputs: start my datagive me more datagive me more datagive me more data... etc
__________________
-- my bad lol
Reply With Quote
  #5 (permalink)  
Old 05-04-04, 02:59 PM
move3rd move3rd is offline
Newbie Coder
 
Join Date: Mar 2004
Posts: 20
Thanks: 0
Thanked 0 Times in 0 Posts
Thanks rec0n!
Reply With Quote
Reply

Bookmarks


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

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 Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Place Image on text according to variable perleo PHP 18 01-10-06 10:21 AM
just joined -- hope this is the right place mrmgraphics New Members & Introductions 1 03-25-04 10:24 PM
Need 2 quotes for a X-Cart Shop Design. shrek-007 Job Offers & Assistance 1 01-22-04 05:38 PM
Database quotes script? redeagle Script Requests 0 12-24-03 03:07 AM
[Tutorial] Hello World Antitrust PHP 10 10-14-03 01:27 PM


All times are GMT -5. The time now is 10:31 AM.
vBulletin® Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.