Wednesday, 6 March 2013
How To Open and Close PHP Tags And Their Types ?
How to open and close PHP tags ?
Php Tags |
In the previous Tutorials of php we have got the basic Introduction Of php and web devlopment. We have also discussed the Installation And Customization Of Xampp. Before writing the code and before its execution, today I am going to brief you about the tags of php which are the basic component of php code.
1) PHP Short Tags :
<?= " This is my first PHP script" ?>
or
<?echo "This is my first PHP script":?>
2) ASP Style Tags:
<%="This is my first php script" %>
or
<% echo "This is my first php script";%>
3). HTML Style Tags:
<script language = "php">
echo "This is my first php script";
</script>
We can only use PHP short tags and ASP style tags when we have already configured it . Php.ini file is the complete configuration of PHP and we can on or off the different modules and settings of php. when we start a web server then the web server completely reads the setings of php from php.ini. So whenever you make changes in this file , then make sure that you restart your web server so that the webserver can read the new settings.
If you are using Xampp the the location of php.ini file will be
c:/xampp/apache/bin/php.ini
And if you want to configure IIS with php then the location of php.ini will be
c:/windows/php.ini
We will be using (<?php ?>) and (<?= ?>) tags so you do not have to worry about the other two.
At the end of this tutorial you should have learnt about the PHP tags and their types. We will learn the use of php tags in coming tutorials. If you have still any problem in any of these feel free to ask.
I Hope that this blog and my tutorials will be helping you alot, as I am trying my best to convey knowledge in a simple and effecient way. So kindly please make sure to share this on facebook, Twitter, Google+, subscribe for email updates. Thanks . Stay Blessed !
PHP Tags |
Summary :
Last Words :
I Hope that this blog and my tutorials will be helping you alot, as I am trying my best to convey knowledge in a simple and effecient way. So kindly please make sure to share this on facebook, Twitter, Google+, subscribe for email updates. Thanks . Stay Blessed !
Author: Mohammad
Mohammad is the founder of STC Network which offers Web Services and Online Business Solutions to clients around the globe. Read More →
Related Posts:
PHP Tricks and Tutorials Web Development
Subscribe to:
Post Comments (Atom)
interesting post :)thanks for PHP Script tips
ReplyDelete