Solved

Date format in Spanish

Posted on 2004-09-10
2
466 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
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

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
PHP mail() function not working... 8 37
Change a button after e-mail 4 23
How do I Enable submit button only if listbox has items 4 36
php hashing methods 3 19
These days socially coordinated efforts have turned into a critical requirement for enterprises.
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…
The viewer will learn how to count occurrences of each item in an array.

697 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