Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

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

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

Open in new window

?
0
Comment
Question by:deleyd
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
7 Comments
 
LVL 35

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:Cornelia Yoder
Cornelia Yoder earned 200 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 111

Accepted Solution

by:
Ray Paseur earned 200 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
VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

 
LVL 35

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:Cornelia Yoder
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 35

Expert Comment

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

Featured Post

New benefit for Premium Members - Upgrade now!

Ready to get started with anonymous questions today? It's easy! Learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Many old projects have bad code, but the budget doesn't exist to rewrite the codebase. You can update this code to be safer by introducing contemporary input validation, sanitation, and safer database queries.
This article discusses how to implement server side field validation and display customized error messages to the client.
The viewer will learn how to dynamically set the form action using jQuery.
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 …

705 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