Recursion in php

Recursion : What is recursion ? Recursion means factorial . A recursive function is one that calls an instance of the same function from withing itself. There are times when this type of recursion can overcome problems and handle scenarios that would otherwise be imposiible .   syntex : n! = n * ((n –

Create Cookie Based Page Counter in php

<?php if (!isset($_COOKIE[‘visits’])) $_COOKIE[‘visits’] = 0; $visits = $_COOKIE[‘visits’] + 1; setcookie(‘visits’,$visits,time()+3600*24*365); ?> <html> <head> <title> Visit Counter</title> </head> <body> <?php if ($visits > 1) { echo(“This is visit number $visits.”); } else { // First visit echo(‘Welcome to my Website! ‘); } ?> </body> </html>

Random Password Generate in PHP

In this tutorial i am create Random Password Generate in php so you can choose secure password create . <?php $string = “abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ1234567890~!@#$%^&*()_+{}<>?”; echo substr(str_shuffle($string), 0, 12); //you can add start to end length from the password //12 is minimum 12 letter password ?>

Create division table in PHP

<!–¬† A division table –> <?php $start_num = 1; $end_num = 10; ?> <HTML> <HEAD> <TITLE>A division table</TITLE> </HEAD> <BODY> <H2>A division table</H2> <TABLE BORDER=1> <?php print(“<TR>”); print(“<TH> </TH>”); for ($count_1 = $start_num; $count_1 <= $end_num; $count_1++) print(“<TH>$count_1</TH>”); print(“</TR>”); for ($count_1 = $start_num; $count_1 <= $end_num; $count_1++) { print(“<TR><TH>$count_1</TH>”); for ($count_2 = $start_num; $count_2 <=