echo this line in php

Discussion in 'PHP' started by ironmankho, Oct 3, 2012.

  1. #1
    usually i use ' ' , " " that for echo lines

    but now i have little bit problem

    How i echo this line

    $line=<td class="play2Png"><a href="http://forums.digitalpoint.com" onclick="javascript:void window.open('http://forums.digitalpoint.com','1349207004705','width=400,height=300,toolbar=0,menubar=0,location=0,status=1,scrollbars=1,resizable=1,left=0,top=0');return false;">Play Online</a></td>


    this code is for pop up generate

    after this i will replace

    http://forums.digitalpoint.com with my $variable
     
    Solved! View solution.
    Last edited: Oct 3, 2012
    ironmankho, Oct 3, 2012 IP
  2. Web Solutions

    Web Solutions Peon

    Messages:
    64
    Likes Received:
    1
    Best Answers:
    5
    Trophy Points:
    0
    #2
    echo "<td class=\"play2Png\"><a href=\"http://forums.digitalpoint.com\" onclick=\"javascript:void window.open('http://forums.digitalpoint.com','1349207004705','width=400,height=300,toolbar=0,menubar=0,location=0,status=1,scrollbars=1,resizable=1,left=0,top=0');return false;\">Play Online</a></td>";
    PHP:
    It should work, but be aware that I haven't tested it.
     
    Web Solutions, Oct 3, 2012 IP
  3. ironmankho

    ironmankho Active Member

    Messages:
    393
    Likes Received:
    2
    Best Answers:
    0
    Trophy Points:
    55
    #3
    Parse error: syntax error, unexpected T_STRING, expecting ',' or ';' in /homepages/26/d94605010/htdocs/lz/writecodeonline.com/php/index.php(201) : eval()'d code on line 1

    http://writecodeonline.com/php/
    -------------------------------
     
    ironmankho, Oct 3, 2012 IP
  4. #4
    this is working perfectly:

    $line = "<td class=\"play2Png\"><a href=\"http://forums.digitalpoint.com\" onclick=\"javascript:void window.open('http://forums.digitalpoint.com','1349207004705','width=400,height=300,toolbar=0,menubar=0,location=0,status=1,scrollbars=1,resizable=1,left=0,top=0');return false;\">Play Online</a></td>";

    dont test it on that page (writecodeonline) because it has some problems with parsing. just check it locally or online and you will see that it works
     
    No User Name, Oct 3, 2012 IP
  5. ironmankho

    ironmankho Active Member

    Messages:
    393
    Likes Received:
    2
    Best Answers:
    0
    Trophy Points:
    55
    #5
    ironmankho, Oct 3, 2012 IP
  6. y8games2012

    y8games2012 Peon

    Messages:
    17
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    0
    #6
    you can try my code which be edited
     
    y8games2012, Oct 3, 2012 IP
  7. Drent123

    Drent123 Peon

    Messages:
    105
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #7
    echo used for print the value.
     
    Drent123, Oct 3, 2012 IP