How to make <?= $value work

Chris Worner

Well-known member
Registered
Joined
Apr 15, 2016
Messages
612
Points
28
My web developer wrote this code

var amp = '<?= $amp; ?>';

In some cases, my code didn't work and I have to replace with var amp = '<?php echo $amp; ?>';

How can I make <?= understand as <?php echo

Many thanks!
 

Maxoq

Well-known member
Registered
Joined
Feb 25, 2015
Messages
520
Points
28
Find short_open_tag in your hosting control panel or in php.ini and enable it, it will solve your problem.

short_open_tag.jpg
 

VirtuBox

Well-known member
Registered
Joined
May 3, 2016
Messages
1,622
Points
83
Latest Threads
Replies
1
Views
24
Replies
0
Views
176
Replies
1
Views
37
Replies
2
Views
81
Recommended Threads
Replies
6
Views
1,322
Replies
2
Views
2,057
Replies
3
Views
1,673
Replies
1
Views
2,138
fwh

Latest postsNew threads

Latest Hosting OffersNew Reviews

Sponsors

Tag Cloud

You are using an out of date browser. It may not display this or other websites correctly.
You should upgrade or use an alternative browser.

Top