php echo problem

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • xirowei
    New Member
    • Jun 2007
    • 17

    #1

    php echo problem

    echo "<td width=\"300\" align=\"left\"> <?php echo $_SESSION['EmployeeNo'] ?></td>";

    The above line of code give me the error message:
    "Parse error: syntax error, unexpected T_ENCAPSED_AND_ WHITESPACE, expecting T_STRING or T_VARIABLE or T_NUM_STRING in D:\XAMPP\htdocs \DW\personalDet ail.php on line 132"

    I new to php, no idea how to fix this issue, i just know there is something wrong starting from<?php......

    I'm glad if anyone can point out my error. Thanks.
  • ronverdonk
    Recognized Expert Specialist
    • Jul 2006
    • 4259

    #2
    You do an <?php....?> within a PHP command, so change it to[php]echo "<td width=\"300\" align=\"left\"> ".$_SESSION['EmployeeNo']."</td>";[/php]Ronald

    Comment

    • xirowei
      New Member
      • Jun 2007
      • 17

      #3
      Thanks for your help.

      Comment

      • ronverdonk
        Recognized Expert Specialist
        • Jul 2006
        • 4259

        #4
        Originally posted by xirowei
        Thanks for your help.
        Welcome. See you next time.

        Ronald

        Comment

        Working...