Solved

Date format in Spanish

Posted on 2004-09-10
2
467 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

Free Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Author Note: Since this E-E article was originally written, years ago, formal testing has come into common use in the world of PHP.  PHPUnit (http://en.wikipedia.org/wiki/PHPUnit) and similar technologies have enjoyed wide adoption, making it possib…
I imagine that there are some, like me, who require a way of getting currency exchange rates for implementation in web project from time to time, so I thought I would share a solution that I have developed for this purpose. It turns out that Yaho…
The viewer will learn how to look for a specific file type in a local or remote server directory using PHP.
The viewer will learn how to create a basic form using some HTML5 and PHP for later processing. Set up your basic HTML file. Open your form tag and set the method and action attributes.: (CODE) Set up your first few inputs one for the name and …

691 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