SitePoint Sponsor

User Tag List

Results 1 to 3 of 3
  1. #1
    SitePoint Addict chartahir's Avatar
    Join Date
    Oct 2006
    Location
    Karachi, Pakistan
    Posts
    253
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    PHP sentax for <?=

    PHP Code:
    <?=$var?>
    What does this code mean, i see this in a code , but have to change i it to

    PHP Code:
    <?php echo $var?>
    to work for me.
    chartahir

  2. #2
    SitePoint Wizard HarryR's Avatar
    Join Date
    Dec 2004
    Location
    London, UK
    Posts
    1,376
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    The abbreviated PHP "open and echo" tag:
    PHP Code:
    <?= /* everything here is outputted*/ ?>
    Is the equivilent to:
    PHP Code:
    <?php echo /* everything here is outputted*/?>

  3. #3
    Sell crazy someplace else markl999's Avatar
    Join Date
    Aug 2003
    Location
    Manchester, UK
    Posts
    4,007
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Note that <?=$var?> type syntax requires short_open_tag = On in your php.ini file, vhost section of httpd.conf or a .htaccess file.


Bookmarks

Posting Permissions

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