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
535
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
Recommended Threads
Replies
9
Views
14,166
Replies
7
Views
4,873
Replies
5
Views
4,588
Replies
10
Views
4,399
UVM

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