My Community
Work At Home Free Classifieds => Post Your Products & Services Here => Topic started by: Sharmait007 on September 19, 2011, 06:47:12 AM
-
The PHP date()
The PHP date() function is used to display time and date.
Syntax:
date(format,timestamp)
example:
?
$d = date("F j, Y, g:i a");
?>
<?php
echo date("Y-m-d");
echo date("Y/m/d");
echo date("M d, Y");
echo date("F d, Y");
echo date("D M d, Y");
echo date("l F d, Y");
echo date("l F d, Y, h:i:s");
echo date("l F d, Y, h:i A");
?>
Array:
An array stores multiple values in one single variable.
In PHP, there are three kind of arrays:
• Numeric array - An array with a numeric index
$names = array(“Akki”,”Jimmi”,”Joy”);
• Associative array - An array where each ID key is associated with a value
$families = array
(“Griffin”=>array
( “sam”,” dino”, “john”),
“Jimmi”=>array
(“Glenn” ),
“Brown”=>array
(“Cmohan”, “rajesh”,”machi”));
• Multidimensional array - An array containing one or more arrays
$ages = array(“sam”=>21, “dino”=>18, “john”=>20);
----------------
Visit Us At:http://www.cegonsoft.com (http://www.cegonsoft.com)
cegonsoft (http://www.cegonsoft.com/php&mysql.php)