0

What is the use of the following symbols in php?

<?= code($data); ?>

Though I don't know the actual use of the above symbol, I found out that I can use

<?= my_function($data1,$data2); ?>

instead of using

<?php echo my_function($data1,$data2); ?>

Can anyone explain what exactly is happening here and what is the use of it?

bytestorm
  • 1,411
  • 3
  • 20
  • 36
  • [Are PHP short tags acceptable to use?](http://stackoverflow.com/questions/200640/are-php-short-tags-acceptable-to-use) – Prix Feb 12 '14 at 18:33
  • Great i found the answer here [link](http://stackoverflow.com/questions/3737139/reference-what-does-this-symbol-mean-in-php) ... – bytestorm Feb 12 '14 at 18:43

2 Answers2

0

It's a quick way of echoing text, as that's one of the most common uses of PHP.

Zoey Mertes
  • 3,139
  • 19
  • 23
0

As of PHP 5.4, <?= ?> is essentially the short-hand way of writing <?php ?>.

Smittey
  • 2,475
  • 10
  • 28
  • 35