Solved

what is <?= ....?> in PHP

Posted on 2014-01-07
7
192 Views
Last Modified: 2014-01-07
What does the syntax <?= mean in
<?= $head_script ?>

Open in new window

?
0
Comment
Question by:deleyd
7 Comments
 
LVL 34

Expert Comment

by:gr8gonzo
ID: 39762812
It's shorthand for outputting a value. It's the same as:

<? echo $head_script; ?>
0
 
LVL 27

Assisted Solution

by:yodercm
yodercm earned 50 total points
ID: 39762817
it switches to php, then echoes out the value of the $head_script variable, then switches back to html.
0
 
LVL 108

Accepted Solution

by:
Ray Paseur earned 50 total points
ID: 39762834
It's called the "short echo tag."  Contrast the "short open tag" which you do not want to use because it is configuration-dependent and may cause confusion with XMLdocuments.  The short echo tag can be used rather easily to embed a PHP value in an HTML document.  See also the HEREDOC string.

If you're interested in learning PHP, this article will help you get started:
http://www.experts-exchange.com/Web_Development/Web_Languages-Standards/PHP/A_11769-And-by-the-way-I-am-new-to-PHP.html
0
Highfive Gives IT Their Time Back

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

 
LVL 34

Expert Comment

by:gr8gonzo
ID: 39762882
Um, okay... I guess having the first right answer doesn't cut it anymore.
0
 
LVL 27

Expert Comment

by:yodercm
ID: 39763575
I agree with you, gr8gonzo, you should have shared the points.  I used to request attention myself when this happened to someone else, and suggest sharing the points, but the last time I did that, the mod took all the points away from me and gave them all to the other person, so I refuse to be generous again.  I suggest you do it ... :)
0
 

Author Comment

by:deleyd
ID: 39763620
My apologies. I'll add weight to the first right answer next time.

Thank you for the answers.
0
 
LVL 34

Expert Comment

by:gr8gonzo
ID: 39763987
It's not a big deal.
0

Featured Post

Highfive + Dolby Voice = No More Audio Complaints!

Poor audio quality is one of the top reasons people don’t use video conferencing. Get the crispest, clearest audio powered by Dolby Voice in every meeting. Highfive and Dolby Voice deliver the best video conferencing and audio experience for every meeting and every room.

Join & Write a Comment

This article will explain how to display the first page of your Microsoft Word documents (e.g. .doc, .docx, etc...) as images in a web page programatically. I have scoured the web on a way to do this unsuccessfully. The goal is to produce something …
Part of the Global Positioning System A geocode (https://developers.google.com/maps/documentation/geocoding/) is the major subset of a GPS coordinate (http://en.wikipedia.org/wiki/Global_Positioning_System), the other parts being the altitude and t…
This tutorial will teach you the core code needed to finalize the addition of a watermark to your image. The viewer will use a small PHP class to learn and create a watermark.
The viewer will learn how to create a basic form using some HTML5 and PHP for later processing. Set up your basic HTML file. Open your form tag and set the method and action attributes.: (CODE) Set up your first few inputs one for the name and …

707 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

14 Experts available now in Live!

Get 1:1 Help Now