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
23
Views
14,325
Replies
3
Views
3,387
Replies
5
Views
6,511
Replies
34
Views
17,275

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