Php Tutorial - Beginner to Expart Guide :
How To Learn Basic Php Code :
![]() |
Php Code |
History
of Php Language:
Php
Generally Use For Develop Website Static To Dynamic. It Is Commonly Named PHP: Hypertext
Preprocessor. It is Created By Rasmus Lerdorf In 1994.It Is also A Open Source
Language & server-side language to use For Web Development Purpose.
Why Php Code is easy to learn for start-up:
This Language is very good to use for development purpose. It
is simple and easy to write code. It can also easily embedded with html mark-up
tags. Here We have given Php coding Example
Learn Basic Php Syntax:
Start First Program Using Php Code :
<?php// Starting First Program Print in Php$var = “This is first program”;Print ($var);?>
Explanation of this Program:
In this php program we have written two line of syntax.
Firstly We have assigned command line using (//).It is called also single line
command in php. After that we have taken a simple variable is called $var where
we have stored string variable. Lastly we closed with semicolon (;) for this closing
syntax. For all programming language, syntax always closed with semicolon
otherwise it would be wrong or coding error. Then we have used print function
for print the variable result. At last it is executed on the server and the
result sent back to browser.
Php Video Tutorial Live Example :
Here We have shown live Php Tutorial Video For Beginner To Get Easily Understand.Lets Check Out Our Free Video Tutorial
Saving Files with Php Extension :
Extension is very important factor for any programming files
for saving. For php we need to save the file using (.php) extension for run any
php program. we have followed several step to save files and used sublime text
editor.
How to save php file in xammp htdocs folder :
Step-by-Step Guide :
- 1. Write your first Php script
- 2. Go to file menu option
- 3. Click on save option
- 4. Click on xampp folder where xampp is installed
- 5. Go to htdocs folder into xampp folder
- 6. Create your own folder and put name on it
- 7. Save on file with php extension / Example - (xyz.php)
Php code embedded in html tags:
This is very simple script where we can use in html tags.it
is also user friendly language and easy to use in html.for example we have
shown the script how we can use in html.
Php example:
Php embed Code in html example
<?php$title = “Php Coding Example for beginner”;?><html><head><title><?php echo $title;?></title></head><body><?php$bodyText = “This is php script embedded with html tags”;echo $bodyText;?></body></html>
Explain this php program embed in html language :
In this program we have firstly used php script before using
html tags.it means that we have created dynamic title for html header section.it
is very effective for particular html title tags because it has created dynamic
title for html title section and anywhere we can use it.After that we have used
php script into html body tag.it mean it has embedded with html mark-up tag.
Php comment types:
Generally For all programming language comment is used for
two types.one is single line command and other is multiple line commant.in this
chapter we use php script so we have shown the php command example in script.
<?php // here $var is a variable and stored integer value $var = 20;
echo $var; /* This is echo function
The function print the output of $var variable.
*/
?>
If you want to learn more php coding example please click on
this link how to use variable in php.
No comments:
Post a Comment