How to make <?= $value work

Chris Worner

Well-known member
Joined
Apr 15, 2016
Messages
366
Best answers
0
Ratings
35
Points
28
#1
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
Joined
Feb 25, 2015
Messages
367
Best answers
0
Ratings
47 1
Points
28
#2
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

Global Mod
Staff Member
Joined
May 3, 2016
Messages
1,543
Best answers
4
Ratings
411 13
Points
83
#3
Latest Threads
Replies
1
Views
22
Replies
1
Views
24
Replies
0
Views
19
Replies
2
Views
31

Latest postsNew threads

Latest Hosting OffersNew Reviews

Sponsors

Latest Blog ArticlesMost Viewed Threads

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