Jump to content

Proper Opening of PHP


The Little Guy

Recommended Posts

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

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.