feck Posted January 20, 2007 Share Posted January 20, 2007 Say you have a variable that represents a date:$date = "01/05/2007";are there any functions to retrieve the day, month and year values, and put them into different variables:$day;$month;$year; Link to comment Share on other sites More sharing options...
Lulzim Posted January 20, 2007 Share Posted January 20, 2007 <?$date = "01/05/2007";$date2=explode("/", $date);echo "Date:".$date2[0]."<br>";echo "Month:".$date2[1]."<br>";echo "Year:".$date2[2]."<br>";?> Link to comment Share on other sites More sharing options...
feck Posted January 20, 2007 Author Share Posted January 20, 2007 Thanks Lul! Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now