Improve company productivity with a Business Account.Sign Up

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 222
  • Last Modified:

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

What does the syntax <?= mean in
<?= $head_script ?>

Open in new window

?
0
deleyd
Asked:
deleyd
2 Solutions
 
gr8gonzoConsultantCommented:
It's shorthand for outputting a value. It's the same as:

<? echo $head_script; ?>
0
 
Cornelia YoderArtistCommented:
it switches to php, then echoes out the value of the $head_script variable, then switches back to html.
0
 
Ray PaseurCommented:
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
Keep up with what's happening at Experts Exchange!

Sign up to receive Decoded, a new monthly digest with product updates, feature release info, continuing education opportunities, and more.

 
gr8gonzoConsultantCommented:
Um, okay... I guess having the first right answer doesn't cut it anymore.
0
 
Cornelia YoderArtistCommented:
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
 
deleydAuthor Commented:
My apologies. I'll add weight to the first right answer next time.

Thank you for the answers.
0
 
gr8gonzoConsultantCommented:
It's not a big deal.
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Free Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say thank you for being a part of the community.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now