0

I'm trying to figure out why and what exactly this is, I've tried finding documentation on Google but without know the terminology I can't really find a reliable search. I saw a code similar to this

<?php
  $text = "Hello World";
?>
<?=$text?>

This will echo Hello World so what is it exactly, since it's doing the same as echo. Also doesn't seem like a big space junky either, As I've tried this on IDE ONE

Can someone give me a rundown or at least link me to the terminology and other short hands.

EasyBB
  • 6,176
  • 9
  • 47
  • 77
  • 2
    `=` is short open tag format for "echo". Short open tags must be ON in order for it to work. Another short tag is `` which is equivalent to ` http://www.php.net//manual/en/language.basic-syntax.phptags.php & http://www.php.net/manual/en/ini.core.php#ini.short-open-tag – Funk Forty Niner Jun 18 '14 at 06:28
  • Did you read documentation about mentioned echo? – sectus Jun 18 '14 at 06:29
  • It's explained in the [echo manual](http://de2.php.net/manual/en/function.echo.php). – Gerald Schneider Jun 18 '14 at 06:29
  • `=$text?>` is abbreviation for `` – Unlink Jun 18 '14 at 06:29
  • @Fred-ii- since PHP 5.4 short tags is no longer needed to use it. – Gerald Schneider Jun 18 '14 at 06:31
  • 1
    Ok thanks guys, and never thought to look at the echo documentation because I wasn't quite sure what it was doing. I knew it was outputting the text, so not 100% sure. Thanks guys. I will read the links provided that is all I needed. – EasyBB Jun 18 '14 at 06:32

0 Answers0