|
-
Jun 3rd, 2008, 01:28 PM
#1
Thread Starter
Frenzied Member
[RESOLVED] Help fixing this Parse error: syntax error, unexpected T_STRING, expecting ',' or ';'
Hi all i try to run the following script but i keep getting error:
Parse error: syntax error, unexpected T_STRING, expecting ',' or ';' in c:\server\www\music\paging.php on line 99
pointing at :
'<a href="#" onclick="music=play.open('divbox', 'div','. $row['idyoutube'] .', '. $row['title'] .', 'width=450px,height=400px,left=200px,top=150px,resize=1,scrolling=1'); return false;" title="Play This Video">' .
could any one help me fix this problem ?Thanks
PHP Code:
while ($row = mysql_fetch_assoc($result)) {
if ($i % $colsPerRow == 0) {
// start a new row
echo '<tr>';
}
echo '<td width="' . $colWidth . '%">' .
.
'<a href="#" onclick="music=play.open('divbox', 'div','. $row['idyoutube'] .', '. $row['title'] .', 'width=450px,height=400px,left=200px,top=150px,resize=1,scrolling=1'); return false;" title="Play This Video">' .
'<img width="120" src="' . $row['thumbnail_url'] . '" height="90" border="0">' .
'<br>' . $row['title'] . '</a><br />' . $row['view_count'] . '|' . $row['comment_count'] . '=>Status:' . $row['embed_status'] . '</td>';
if ($i % $colsPerRow == $colsPerRow - 1) {
// end this row
echo '</tr>';
}
$i += 1;
}
-
Jun 3rd, 2008, 03:12 PM
#2
Hyperactive Member
Re: Help fixing this Parse error: syntax error, unexpected T_STRING, expecting ',' or ';'
PHP Code:
'<a href="#" onclick="music=play.open('divbox', 'div','. $row['idyoutube'] .', '. $row['title'] .', \'width=450px,height=400px,left=200px,top=150px,resize=1,scrolling=1\'); return false;" title="Play This Video">' .
Seems to be just an escaping issue
» Twitter: @rudi_visser : Website: www.rudiv.se «
If Apple fixes security flaws, they are heralded as proactive. If Microsoft fixes a security flaw, they finally got around to fixing their buggy OS.
-
Jun 3rd, 2008, 04:39 PM
#3
Thread Starter
Frenzied Member
Re: Help fixing this Parse error: syntax error, unexpected T_STRING, expecting ',' or ';'
Ruivisser thanks but your code doesn't put ' around the title and idyoutube !! Without that my onclick function will not work!! could you tell me how to fix that ?Thanks
-
Jun 3rd, 2008, 04:56 PM
#4
Hyperactive Member
Re: Help fixing this Parse error: syntax error, unexpected T_STRING, expecting ',' or ';'
Well that's not my fault, your code didn't do that in the first place I was going to say something... but anyway 
PHP Code:
'<a href="#" onclick="music=play.open('divbox', 'div', \''. $row['idyoutube'] .'\', \''. $row['title'] .'\', \'width=450px,height=400px,left=200px,top=150px,resize=1,scrolling=1\'); return false;" title="Play This Video">' .
» Twitter: @rudi_visser : Website: www.rudiv.se «
If Apple fixes security flaws, they are heralded as proactive. If Microsoft fixes a security flaw, they finally got around to fixing their buggy OS.
-
Jun 3rd, 2008, 06:20 PM
#5
Thread Starter
Frenzied Member
Re: Help fixing this Parse error: syntax error, unexpected T_STRING, expecting ',' or ';'
Many Many thanks yeah it was my mistake . it got fixed :-)
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|