Results 1 to 5 of 5

Thread: [RESOLVED] Help fixing this Parse error: syntax error, unexpected T_STRING, expecting ',' or ';'

  1. #1

    Thread Starter
    Frenzied Member
    Join Date
    Apr 2005
    Posts
    1,907

    Resolved [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;


  2. #2
    Hyperactive Member
    Join Date
    Dec 2006
    Location
    Ubuntu Haters Club
    Posts
    405

    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.

  3. #3

    Thread Starter
    Frenzied Member
    Join Date
    Apr 2005
    Posts
    1,907

    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

  4. #4
    Hyperactive Member
    Join Date
    Dec 2006
    Location
    Ubuntu Haters Club
    Posts
    405

    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.

  5. #5

    Thread Starter
    Frenzied Member
    Join Date
    Apr 2005
    Posts
    1,907

    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
  •  



Click Here to Expand Forum to Full Width