Wednesday, 5 February 2014

switch case in php



2.program Switch case in php

<?php
$day="sun";
switch ($day)
{
case "sun":
 echo "today is Sunday";
 break;
case "Monday":
echo "today is Monday";
break;
case "Tuesday":
echo "today is Tuesday";
break;
case "Wednesday":
echo "today is Wednesday";
break;
default:
echo "today is ?";
}
?>

Tuesday, 4 February 2014

1st program in php

simple and 1st program of php:-

<?php
echo "this is my first program.;"
>

o/p= this is my first program.


here  "echo " keyword is used for print the data.
we start php with "<php " and end with ">"

what is php.



PHP stands for hyper text preprocessor language and this is used for only web based application  means online for web development and PHP is a server-side scripting language but also used as a general-purpose programming language. PHP is now installed on more than 2440000000 websites and 2.1 million web servers also on internet.PHP is invented by  Rasmus Lerdorf in 1995.Server-Side Scripting Language means that is run on server. The server may b local host or on the world wide web.php is used with CSS and html tags.PHP is open source software released under the PHP License. Here open source means it is free for all. The cost of PHP software is noting