*** ubccis@gmail.co m escribió/wrote (27 Jan 2005 11:50:33 -0800):[color=blue]
> What are the differences between using these?
>
> <?= and <?php and <?[/color]
<? is shorthand for <? echo
The PHP manual explains it better than I could:
"There are four sets of tags which can be used to denote blocks of PHP
code. Of these, only two (<?php. . .?> and <script language="php"> . .
..</script>) are always available; the others can be turned on or off from
the php.ini configuration file. While the short-form tags and ASP-style
tags may be convenient, they are not as portable as the longer versions.
Also, if you intend to embed PHP code in XML or XHTML, you will need to use
the <?php. . .?> form to conform to the XML."
The <script> alternative exists because of certain issues with some HTML
editors such us Front Page.
--
-+ Álvaro G. Vicario - Burgos, Spain
+- http://www.demogracia.com (la web de humor barnizada para la intemperie)
++ Manda tus dudas al grupo, no a mi buzón
-+ Send your questions to the group, not to my mailbox
--
Thanks...this is a big help.
Just wondering, in the future, how do you recommend me to search for
answers to syntax related questions? For example, Google does not
allow searches such as '<?='.
*** ubccis@gmail.co m escribió/wrote (27 Jan 2005 13:07:51 -0800):[color=blue]
> Just wondering, in the future, how do you recommend me to search for
> answers to syntax related questions? For example, Google does not
> allow searches such as '<?='.[/color]
PHP is a popular general-purpose scripting language that powers everything from your blog to the most popular websites in the world.
I recommend the "Extended HTML Help" download if you are a Windows user.
Most of your questions are probably covered in the "Language Reference"
chapter:
The rest is just a matter of intuition and common sense. Since you
absolutely need to use <? to execute any code, that must be explained in
the very first page :)
--
-+ Álvaro G. Vicario - Burgos, Spain
+- http://www.demogracia.com (la web de humor barnizada para la intemperie)
++ Manda tus dudas al grupo, no a mi buzón
-+ Send your questions to the group, not to my mailbox
--
<?= is enabled by default in PHP, is a shortcut for print a variable
content or a functions return. It's just like the ASP <%=
Regards,
Ramiro Varandas Jr.
Comment