ابدأ بالتواصل مع الأشخاص وتبادل معارفك المهنية

أنشئ حسابًا أو سجّل الدخول للانضمام إلى مجتمعك المهني.

متابعة

What's the difference between <?php ?> and <?= ?>

user-image
تم إضافة السؤال من قبل Adel Ezat Fawzy Ellozy , Webdeveloper. , Saudi Arabian Maritiem Sports Federation
تاريخ النشر: 2017/01/27
Adel Ezat Fawzy Ellozy
من قبل Adel Ezat Fawzy Ellozy , Webdeveloper. , Saudi Arabian Maritiem Sports Federation

<?php  ?> is a regular php opening and closing tag

<?=  ?> is a short hand for <?php  echo  '' ;  ?> 

Ehab  Shaker
من قبل Ehab Shaker , Dot Net Developer , Info Strategic

<?php

$s="hello world";

?>

<span ><?= $s ?></span>

<br>

 

<?php

$s="hello world";

?>

<span ><?php echo $s ?></span>

_________________________________________________

The Results is:

     hello world 

     hello world

___________________________________________

If this is what you mean....

Zuhair Muhammed
من قبل Zuhair Muhammed , Software / Web Developer , CIEL HR Services Pvt. Ltd.

<?php

// Mostly used way and Correct way of coding

?>

<?

// To use this tags we have to make change in php.ini file. we need to enable short_open_tag

?>

Zaighum Abbas
من قبل Zaighum Abbas , WEB DEVELOPER , MARTECH CCTV & IT SERVICES SHARJAH

both are tabs and used for php code no difference in both statements.

 

المزيد من الأسئلة المماثلة

هل تحتاج لمساعدة في كتابة سيرة ذاتية تحتوي على الكلمات الدلالية التي يبحث عنها أصحاب العمل؟