What is PHP and It’s Syntax – PHP Tutorials
PHP is the recursive acronym that probably means to confuse the masses. PHP stands for Hypertext Preprocessor which allows your website to be dynamic.
PHP is a completely server-side scripting language. PHP is very flexible and easy to learn those who have knowledge of programming languages like (C, Java, Perl), will be very easy to learn so.
If you don’t have the knowledge of C or Java it will be a little bit difficult but not impossible to learn so you don’t have to worry about PHP. PHP is mostly used to enhance web pages, with PHP you can make login forms you can create username and password you can check details from a form, create forums and many more things.
PHP is embedded with HTML. PHP has compatibility to connect with databases through MYSQL or any Database Management Software. You can create a database, tables and you fetch data from the database and you can display those data in own way.
PHP’s popularly continues to increase as business and individuals everywhere embrace it as an alternative to Microsoft’s ASP.NET language. According to Netcraft, PHP Code can be found running on approximately 21 million websites.
What Do You need?
Before we start, you need to install a few things to run your PHP script on your computer. Without these resources, you cannot run a PHP script.
- First of all, you need to install the server on your computer to run the PHP script locally. The server means the Apache server. You can install apache officially through www.apache.org or you can download wampp application from www.wampserver.com, If still, you can’t find better then you can use one of the popular applications called XAMPP, inside xampp you can find Apache Server, MySQL, Filezilla, Tomcat, Mercury servers.
- If you are on MAC then visit www.mamp.info and you will get application and download and install on your MAC.
PHP allows your script to collect users’ information, It means, you can let your user directly interact with the script.
PHP code is dented in the page with opening and closing tags, as follows, <?php . //code goes here . //comment ignored . /*ignored automatically*/ ?>
<title>My First PHP Code</title>
<body> <?php echo "HELLO WORLD ! ";
echo "<p>PHP SCRIPT IS RUNNING SUCCESSFULLY</p>";
echo "<i>DO ECHO TO GET STRING OUTPUT</i>";
echo " <b>THE MOST POPULAR SCRIPTING LANGUAGE IS PHP</b>";
echo " <u>THANKS FOR LOVING PHP _ :D </u>"; ?>