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 3 of 3

Thread: Syntax issue?

  1. #1
    Regular Coder
    Join Date
    Jan 2009
    Posts
    156
    Thanks
    47
    Thanked 0 Times in 0 Posts

    Syntax issue?

    This bit of code has worked for a while but on a new site (and host) is causing an error: Parse error: syntax error, unexpected '=' in /admin.php on line 111

    <?php=$_GET['do']?>

  • #2
    Regular Coder kokjj87's Avatar
    Join Date
    Sep 2008
    Location
    Singapore
    Posts
    279
    Thanks
    1
    Thanked 55 Times in 54 Posts
    For php shorthand tag
    PHP Code:
    <?=$_GET['do']?>
    OR
    PHP Code:
    <?php echo $_GET['do'];?>

  • #3
    Regular Coder Iszak's Avatar
    Join Date
    Jun 2007
    Location
    Perth, Western Australia
    Posts
    332
    Thanks
    2
    Thanked 58 Times in 57 Posts
    You should use the full tags, because of the conflict with XML declarations. So as kokjj87 said use.
    PHP Code:
    <?php echo $_GET['do'?>


  •  

    Posting Permissions

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