PHP
Hypertext
preprocessor / personal home page
Rasmus Lerdorf
He
created the PHP scripting language
•PHP is an "HTML-embedded
scripting language" primarily used for dynamic Web applications. PHP was written in the C
programming language by Rasmus Lerdorf in 1994 for use in monitoring his online
resume and related personal information. For this reason the php was developed, PHP originally taken for "Personal Home Page".
•PHP is a server side scripting language, and
a powerful tool for making dynamic and interactive Web pages.
•PHP is a widely-used, Open source,
and efficient alternative to competitors such as Microsoft's ASP, JAVA
Feature in php
Feature in php
echo Method: -
<?php
echo "Welcome to PHP Program"."<br>";
Output: -
Welcome to PHP Program
Print Method: -
<?php
Output: -
Hello am from print method
PHP-Errors
<?php
$value=1000;
function myerrors(){
$x=100;
echo $x;
}
$value=1000;
include "header.php";
myerror();
echo $value;
$z=100;
?>
Feature in php
• Syntax
•Comments
•Echo / Print
•PHP Case Sensitivity
•Variables
• Data Types
• Strings
• Constant
• Operators
If.. Else .. Elseif
Switch
While Loops
For Loops
Functions
Arrays
Sorting Arrays
Super globals
Form Handling
Form Validation
Form Required
Form URL/E-mailFeature in php
Adv.
Features
Multi
Arrays
Date
and times
Include
File
Handling
File Upload
Filters
Cookies
Sessions
Filters
How to Print value in PHP By using Echo and Print command: -
echo Method: -
<?php
echo "Welcome to PHP Program"."<br>";
echo "<br>";
echo "am from echo method";
?>
Output: -
Welcome to PHP Program
am from echo method
Print Method: -
<?php
print "Hello am from print method";
?>
Output: -
Hello am from print method
PHP-Errors
<?php
$value=1000;
function myerrors(){
$x=100;
echo $x;
}
$value=1000;
include "header.php";
myerror();
echo $value;
$z=100;
?>
Local Variables: -
<?php
function my_fun(){
$value1=100;
$value2=50;
echo "$value1";
}
my_fun();
echo $value2;
?>
Static Variable program in php: -
<?php
function myTest(){
static $x=100;
echo $x."<br>";
$x++;
}
myTest();
myTest();
myTest();
?>
Comments
Post a Comment