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
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.