pTutorial

New way to learn PHP Example

PHP example or small projects

Small project

In this section, you can learn a lot of PHP examples of that are very use full for us. In other word, you can say that they all examples are the small project like a Simple captcha script, page counter script, creation of random numbers and manipulate form data.

PHP Function Example

No Programs
01 PHP Random Number
02 PHP Case change
03 PHP ASCII Value
04 PHP mail Function

PHP Loop Example

No Programs
01 PHP table
02 PHP Complex loop

PHP Database Example

No Programs
01 Store form data into db
02 Retrieve data from db

PHP 5 Example

No Programs
01 PHP 5 Example

All of the above PHP script is explained very easily and step by step with a live demo and you can also download the script from the Download section of every page.

Random Number example

<?php

$r=rand(0,1520);

printf("Unique number =%d
",$r); ?>

Counter example


<?php

session_start();

$total=$_SESSION['count']=$_SESSION['count']+1;

Echo "you are visited this site ". $total. " times";

?>

ASCII value example

<?php

    $ascii1 = chr(65);
    echo "ASCII value of  65 is : $ascii1
"; $ascii2 = chr(97); echo "ASCII value of 97 is : $ascii2
"; $ascii3 = chr(61); echo "ASCII value of 61 is : $ascii3
"; $ascii4 = chr(42); echo "ASCII value of 42 is : $ascii4
"; ?>

QUOTES OF THE DAY

The heart of melody can never be put down.

LIKE ON FACEBOOK

+1 ON GOOGLE

SHARE ON TWITTER