Download this Blogger Template by Clicking Here!

Ad 468 X 60

Wednesday 6 March 2013

Widgets

How To Open and Close PHP Tags And Their Types ?

How to open and close PHP tags ?


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.

There are four ways to open and close PHP tags which are as follows :




tags
Types Of  Tags


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.


Tags
PHP Tags




Summary :


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.


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 !


SHARE THIS POST   

  • Facebook
  • Twitter
  • Myspace
  • Google Buzz
  • Reddit
  • Stumnleupon
  • Delicious
  • Digg
  • Technorati
Author: Mohammad
Mohammad is the founder of STC Network which offers Web Services and Online Business Solutions to clients around the globe. Read More →

1 comment: