i am retrieving a $_GET variable date: $month= date(m, $date), is there a way to retrieve this and make it convert to its equivalent $month= date(F, $date)??
i need the variable info but i need to get the full textural representation of the month not just the number. And im hoping to do this w/o having to send an additional variable.
fuston05
0
Junior Poster in Training
Recommended Answers
Jump to PostYou will need to convert to a time stamp and then convert back to what you need. First, create an arbitrary date using the month that was passed (e.g "2010-".$m."-01"). Use strtotime to convert it to a time stamp and then use Date to get the full text month.
Jump to Poststrtotime is pretty good at turning english into a date. Here's an example:
<?PHP $ts = strtotime (" next month Dec 2010 "); $text = date ("F",$ts); echo $text; ?>
All 7 Replies
chrishea
182
Nearly a Posting Virtuoso
fuston05
0
Junior Poster in Training
fuston05
0
Junior Poster in Training
chrishea
182
Nearly a Posting Virtuoso
fuston05
0
Junior Poster in Training
fuston05
0
Junior Poster in Training
fuston05
0
Junior Poster in Training
Be a part of the DaniWeb community
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.