Solved

Date format in Spanish

Posted on 2004-09-10
2
464 Views
Last Modified: 2013-12-12
Hello

I have

<?php echo $HTTP_GET_VARS['mes']; ?>, <?php echo $HTTP_GET_VARS['anio']; ?>

which displays

9, 2004

I need to fomat so it shows

Septiembre, 2004 (in Spanish)

Thanks in advance
0
Comment
Question by:ceciliamtz
2 Comments
 
LVL 36

Accepted Solution

by:
Zyloch earned 50 total points
ID: 12032454
Hi

I'm not sure about the Spanish part unless PHP has a Spanish version?

Anyways, you can do this:

$months=array("enero","febrero","marzo","abril","mayo","junio","julio","agosto","septiembre","octubre","noviembre","    
diciembre");

<?php echo($months[intval($HTTP_GET_VARS['mes'])-1]); ?>, <?php echo $HTTP_GET_VARS['anio']; ?>

Regards,
Zyloch
0
 

Author Comment

by:ceciliamtz
ID: 12032483
fast and simple
exactly what I needed

muchas gracias!

Cecilia
0

Featured Post

Announcing the Most Valuable Experts of 2016

MVEs are more concerned with the satisfaction of those they help than with the considerable points they can earn. They are the types of people you feel privileged to call colleagues. Join us in honoring this amazing group of Experts.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This article discusses how to create an extensible mechanism for linked drop downs.
Introduction This article is intended for those who are new to PHP error handling (https://www.experts-exchange.com/articles/11769/And-by-the-way-I-am-New-to-PHP.html).  It addresses one of the most common problems that plague beginning PHP develop…
Learn how to match and substitute tagged data using PHP regular expressions. Demonstrated on Windows 7, but also applies to other operating systems. Demonstrated technique applies to PHP (all versions) and Firefox, but very similar techniques will w…
This tutorial will teach you the core code needed to finalize the addition of a watermark to your image. The viewer will use a small PHP class to learn and create a watermark.

813 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

10 Experts available now in Live!

Get 1:1 Help Now