Opening and closing tag of PHP

Calling Parser

Opening and closing tag of PHP


We can code PHP inside its opening and closing tag we can do this in three ways
1 Example of hello world
<?php
Echo “hello world”;
?>

2 Example of hello world
<?
echo”hello world”;
?>
This tag is discouraged to use because it doesn’t work with EasyPHP WAMP and is incompatible with XML. This tag can be removed in future version


3 For whole PHP code in a file you may omit closing?> because it will ensure that there is no white spaces leaking from your PHP files.


Share on Google Plus

About Rahul Rana

I am an experienced web designer and SEO expert. I am running my own online marketing company i.e "SEO To Web Design". Thanks for reading, keep sharing online marketing and web design knowledge.
    Blogger Comment
    Facebook Comment

0 comments :

Post a Comment

Enter your email address:

Delivered by FeedBurner