SIMPLE FIX: PHP Coding Error

Discussion in 'PHP' started by ellmexicann, May 8, 2010.

  1. #1
    Can someone who knows PHP take a look below and tell me what's wrong? I have a strong feeling it's something very simple lol. Thanks!

    Error Received:
    Parse error: syntax error, unexpected T_STRING, expecting ',' or ';' in /home/braininj/public_html/test/metarefresh1.php on line 2

    Code:
    <?php
    echo "<meta http-equiv="refresh" content="0;url=http://www.brain-injury-attorney.com/test/metarefresh2.php">";
    ?>
     
    ellmexicann, May 8, 2010 IP
  2. joebert

    joebert Well-Known Member

    Messages:
    2,150
    Likes Received:
    88
    Best Answers:
    0
    Trophy Points:
    145
    #2
    Replace this

    echo "<meta http-equiv="refresh" content="0;url=http://www.brain-injury-attorney.com/test/metarefresh2.php">";
    Code (markup):
    With this

    echo '<meta http-equiv="refresh" content="0;url=http://www.brain-injury-attorney.com/test/metarefresh2.php">';
    Code (markup):
     
    joebert, May 8, 2010 IP
  3. ellmexicann

    ellmexicann Peon

    Messages:
    385
    Likes Received:
    2
    Best Answers:
    0
    Trophy Points:
    0
    #3
    You're the man! Thanks a million!
     
    ellmexicann, May 8, 2010 IP
  4. live.co.uk

    live.co.uk Banned

    Messages:
    35
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #4
    you can not use " inside "
     
    live.co.uk, May 8, 2010 IP