why i am getting this error Unexpected character in input: ''' (ASCII=39) state=

Discussion in 'PHP' started by ironmankho, Dec 27, 2011.

  1. #1
    hi i am try to write this code

    $a='<table width="450" height="110" border="0"><tr><td width="150" height="105"><div align="center"><p><a href="http://www.mysite.com/video/';                                                           '
    
    
    echo $a;
    
    PHP:
    but i get this error

    Warning: Unexpected character in input: ''' (ASCII=39) state=1 in D:\Project\php-code.php on line 1
    <a href=



    please give me advise how i can avoid this :)
     
    ironmankho, Dec 27, 2011 IP
  2. dujmovicv

    dujmovicv Member

    Messages:
    62
    Likes Received:
    2
    Best Answers:
    4
    Trophy Points:
    48
    #2
    You haven't closed the href value properly (missing ") :
    
    $a='<table width="450" height="110" border="0"><tr><td width="150" height="105"><div align="center"><p><a href="http://www.mysite.com/video/">LINK</a>'; 
    echo $a;
    
    
    PHP:
     
    dujmovicv, Dec 28, 2011 IP
  3. ironmankho

    ironmankho Active Member

    Messages:
    393
    Likes Received:
    2
    Best Answers:
    0
    Trophy Points:
    55
    #3
    Thanks for this
     
    ironmankho, Dec 28, 2011 IP