php date function

Ads
 

php date function

View Answers

March 27, 2009 at 1:06 AM

Hi Friend,

Try the following code. It is working here on all the browsers.

<?
$d = "1960-12-02";
$db= date("Y", strtotime($d));
echo $db;
?>

Thanks for posting questions.
RoseIndia Team

Ads









Related Tutorials/Questions & Answers:
If function in PHP
If function in PHP  Hi, Provide me the example of If function in PHP. Thanks   Hi, If function is PHP is used to check for some condition and the execute a block of code. He is an example of if() function in PHP
PHP Date
PHP Date  Hi, How to use PHP Date functions in my PHP program? Thanks   Hi, PHP Date functions is very handy. It is used to progracess, format and create date objects in PHP. There are many ways to use PHP Date
Advertisements
php date input calendar
php date input calendar  I'm having an issue while writing the date input calendar function in PHP.. any help? Thanks
date function
date function  Write a JavaScript program to read a date from user and perform the following, if entered value is date then perform the following 1. Display the day no from the date 2. Display the year from the date 3. Display
call function in php
call function in php  What is the call function in PHP please explain
variable function in php
variable function in php  Can any one tell me how to write a variable function in PHP?   Go through the PHP Variable function tutorial ... PHP Variable Function
What is the microtime() Function PHP ?
What is the microtime() Function PHP ?   Hi, What is microtime() Function in PHP? What is the role of Microtime() Function in PHP. Please suggest me any online reference. Thanks
array_merge function in php - PHP
array_merge function in php  What is the best use of array_merge function in php?  Hi Friend, Please visit the following links: http://www.roseindia.net/tutorial/php/phpbasics/PHP-Array-Merge-Recursive.html http
variable function in php
variable function in php  Can any one tell me how to write a variable function in PHP
Eval Function in PHP
Eval Function in PHP  Hello PHP experts, Please tell me about Eval() Function in PHP. How to use Eva() function in PHP? Thanks   Hi, The Eval() function is PHP is very handy. It allows to you store the PHP code
Array Sizeof Function PHP
Array Sizeof Function PHP  Hi, How to count the number of elements in an array using the PHP Array sizeof() function? Please provides me online help links or example of array sizedof() PHP. Thanks
PHP idate() Function
help related to PHP idate() Function. I waiting for your valuable suggestion. Thanks,   Hi, The idate() Function in PHP will returns a string... time if no timestamp is given. Syntax of PHP idate() Function :... int idate
Current date in php
Current date in php  How to show the current date in the HTML page using PHP Script
php function call
php function call  I have an function in error-status.php like this function validateHostName($hostName) { if((strpbrk($hostName,'`[email protected]#$^&... to cal this function in my other page which is datetime.php how it is posible
php inserting date into mysql
php inserting date into mysql  php inserting date into mysql   Here is a php code that inserts date into mysql database. In the given code, data is a database table. <?php table $query_manual = "INSERT INTO data
How to convert date to time in PHP?
How to convert date to time in PHP?  Hi, programmer. The PHP... and time. The PHP "time()" function is used to get the current Unix timestamp..., but as a readable date and time, it leaves much to be desired. Luckily, the PHP
How to use the PHP filetype() Function
How to use the PHP filetype() Function  Hi, What is the use of filetype() Function in php programming. Can anyone give any online example of the PHP filetype() Function. Thanks
PHP file_get_contents() Function
PHP file_get_contents() Function  Hi, How do i read the content of file using PHP program? So kindly provide any example or online help reference for filegetcontents() Function in PHP. Please feel free to suggest. Thanks
How to Declare fflush() Function in PHP
How to Declare fflush() Function in PHP  Hi, Can someone give my any online example for write all the buffered data of an open file. Is it appropriate to use the PHP fflush() Function to develop this application? Please suggest
How to retrieve the ISO Date in PHP?
How to retrieve the ISO Date in PHP?  Hi, I am a beginner in PHP programming language. I have a query how to retrieve the ISO Date in PHP Language. Can any one suggest any reference for this. Thanks
Mysql Date now function
Mysql Date now function       Mysql Date now function is useful when you want to return the current... 'Mysql Date now function'. In this Tutorial we define a now ( ) Query
What is the use of Print or Echo Function in PHP?
What is the use of Print or Echo Function in PHP?  Hi, Can anyone explain what is the use of print or Echo function in PHP? Please provide online... or Echo Function in PHP are same. But on comparing we can say that echo function
Display PHP clock with user input date and time
Display PHP clock with user input date and time  The following PHP code displays a clock with current date and time. I want the clock to receive user input date and time. How can this be done? <?php date<em>
Datepicker not getting called through include function of php
Datepicker not getting called through include function of php  my...[ /* A "Reservation Date" example using two datePickers... handler on the startDate input to call the setReservationDates function
How to add one hour in php date?
How to add one hour in php date?  I have a date variable in PHP and I want to add one hour to it. What is the code for adding one hour to the PHP date? Thanks   Hi, You should convert the date into time and then add
Import Excel file(date) into mysql database in php
Import Excel file(date) into mysql database in php  I try to import excel file which contains data date(yyyy-mm-dd) into mysql database in php. But it not insert the data in mysql. Code $fp = fopen("data.csv",'w'); fwrite
PHP Display date and time
() function in PHP, it doesn't display the correct time and date for their region... PHP displaying the time and date into your timezone  ... the formatted date string Example 1: <?php ECHO "<b>Date using
Fatal error: Call to undefined function session_register() in .php file
Fatal error: Call to undefined function session_register() in .php file  I upgraded the PHP and MySQL and in my application following error is coming: Fatal error: Call to undefined function session_register() in ...php file
The strlen() function
The strlen() function The strlen() function is used to find the length of a string. Syntax is given below : strlen(string) The below example gives you a clear idea : Example : <?php echo strlen("Welcome
The strpos() function
The strpos() function The strpos() function is used to find the availability of a sub string/string inside a string. This function returns FALSE... : Example : <?php echo strpos("Hello PHP!","PHP"); ?>
The $_Request Function
The $_Request Function The contents of both $_GET, $_POST, and $_COOKIE are contained by the PHP built-in $_REQUEST function. $_REQUEST Method is used...;?php echo $_REQUEST["name"]; ?><br /> Address :<?php echo

Ads