calendar in php

In this tutorial i am showing to create calendar in php. you can copy-paste below the code and run it on your computer. —————— calendar.php —————– <!DOCTYPE html> <html> <head> <title>Calendar</title> <style> div#calendar{ margin:0pxauto; padding:0px; width: 602px; font-family:Helvetica, “Times New Roman”, Times, serif; } div#calendar div.box{ position:relative; top:0px; left:0px; width:100%; height:40px; background-color: #787878 ; }

Random Images in php

In this code you can show the random images in your website page. <html> <head> <title>Random Images</title> </head> <body bgcolor = “#000000” > <?php srand( microtime() * 1000000 ); $num = rand( 1, 4 ); switch( $num ) { case 1 : $image = “a.jpg”; //change image as your path $url=”a.php”; // change url path

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 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 <=