Solved

Date format in Spanish

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

Top 6 Sources for Identifying Threat Actor TTPs

Understanding your enemy is essential. These six sources will help you identify the most popular threat actor tactics, techniques, and procedures (TTPs).

Join & Write a Comment

Consider the following scenario: You are working on a website and make something great - something that lets the server work with information submitted by your users. This could be anything, from a simple guestbook to a e-Money solution. But what…
This article discusses four methods for overlaying images in a container on a web page
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…
Explain concepts important to validation of email addresses with regular expressions. Applies to most languages/tools that uses regular expressions. Consider email address RFCs: Look at HTML5 form input element (with type=email) regex pattern: T…

743 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

9 Experts available now in Live!

Get 1:1 Help Now