New to PHP ... Best Practice for PHP tags

Hello …

I am very new to PHP and was wondering which is the best way to set my PHP tags?

<?php //code ?>

or …

<? //code ?>

Dreamweaver lets me do both …

Much thanks

Mike

best practice is use the full php tag “<?php ?>” the other is a shortcut and is not the most supported habit to have. But does work well with HTML and templating.

Thanks Buddy … that is what I thought, but just wanted to make sure.

But I have to ask how to you know when to use a ‘shortcut’?

That really is completely up to you. I tend to try and base it off if it will help me more quickly, Is it easier to understand, Is it easier to write, Is it considered in good practice.