A PHP scripting block always starts with <?php and ends with ?>. A PHP scripting block can be placed anywhere in the document.
On servers with shorthand support enabled you can start a scripting block with <?php and end with ?>.
For maximum compatibility, we recommend that you use the standard form (<?php ?>) rather than the shorthand form.
but the difference between <?php and <? ?> is
when you are using <? ?> at that time in your server short open tag must be allowed if and only if it is allowed then you can write this syntax.
And <?php ?> it is standard syntax whether short open tag is allowed or not.
On servers with shorthand support enabled you can start a scripting block with <?php and end with ?>.
For maximum compatibility, we recommend that you use the standard form (<?php ?>) rather than the shorthand form.
but the difference between <?php and <? ?> is
when you are using <? ?> at that time in your server short open tag must be allowed if and only if it is allowed then you can write this syntax.
And <?php ?> it is standard syntax whether short open tag is allowed or not.
thanx a lot.............
ReplyDelete