The Little Guy Posted January 26, 2008 Share Posted January 26, 2008 As I was working with ASP, I noticed that you can use the first code to work with asp, so I was curious if that would work with php and it does, so... Is the first snippet the "More proper" way? If I were to use that, well, in ASP, you place that in the head of the Web Page, to give labels and buttons name/values. So... instead of having nested PHP in my HTML, can I place it in the head using the script tag like below to make buttons, labels, text fields, etc? <script language="PHP"> echo "hello my name is ryan"; </script> <?php echo "hello my name is ryan"; ?> Link to comment https://forums.phpfreaks.com/topic/87974-proper-opening-of-php/ Share on other sites More sharing options...
revraz Posted January 26, 2008 Share Posted January 26, 2008 <?php is the preferred method. Link to comment https://forums.phpfreaks.com/topic/87974-proper-opening-of-php/#findComment-450109 Share on other sites More sharing options...
PFMaBiSmAd Posted January 26, 2008 Share Posted January 26, 2008 I believe (don't quote me on this) I have seen information for php6, that the first method and the asp_tags ASP-like <% %> tag method will be eliminated. Link to comment https://forums.phpfreaks.com/topic/87974-proper-opening-of-php/#findComment-450126 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.