Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 2 of 2
  1. #1
    New to the CF scene
    Join Date
    Jul 2010
    Posts
    1
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Unhappy What seems to be wrong in the line?

    I am trying to implement a javascript on a page and the error that I get is

    Parse error: syntax error, unexpected T_STRING, expecting ',' or ';' in /fullsize/image.php on line 131

    On line 131 the code is

    Code:
    echo"<img id='thepic' onClick="scaleImg('thepic')" onLoad="scaleImg('thepic')" src='$image'>";

  • #2
    Supreme Master coder! Old Pedant's Avatar
    Join Date
    Feb 2009
    Posts
    25,550
    Thanks
    78
    Thanked 4,382 Times in 4,347 Posts
    That's a PHP error.

    Ask the question in the PHP forum.

    Oh, w.t.h. I don't code in PHP, but even I can see that obvious error:

    You are using a " *INSIDE* of a "..." delimited string!

    Either change to using apostrophes inside the "..." string or use \" to escape them.
    An optimist sees the glass as half full.
    A pessimist sees the glass as half empty.
    A realist drinks it no matter how much there is.


  •  

    Tags for this Thread

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •