PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!
and [syntax="..."] tags where appropriate when posting code. Your post has been edited to reflect how we'd like it posted. Please read: [url=http://forums.devnetwork.net/viewtopic.php?t=21171]Posting Code in the Forums[/url] to learn how to do it too.[/color]
Hello ppl.
I have a form in html for date, and i'm having problems with the March month, because in portuguese march=março, and ç character iskilling me
So the problem is , i receveid th month "março" of my form but i need to compare it to a string to see what month is:
<?php
$month_array = array("Janeiro"=>01, "Fevereiro"=>02, "Março"=>03, "Abril"=>04, "Maio"=>05, "Junho"=>06, "Julho"=>07, "Agosto"=>08, "Setembro"=>09, "Outubro"=>10, "Novembro"=>11, "Dezembro"=>12);
$partida_year = $_POST['partida_year']; //here i have the year
$partida_month = $_POST['partida_month']; // here the month name
$partida_day = $_POST['partida_day'];// here the day of the month
$partida = $partida_year."-".$month_array [$partida_month]."-".$partida_day; // here i want tohave my date like yyyy-mm-dd - but when the month is "Março" i have problems because of the 'ç' how can i do this?
?>
and [syntax="..."] tags where appropriate when posting code. Your post has been edited to reflect how we'd like it posted. Please read: [url=http://forums.devnetwork.net/viewtopic.php?t=21171]Posting Code in the Forums[/url] to learn how to do it too.[/color]
How is the form sending this information? It'd be nice to see (the code of) the form being used. Also, in PHP as with many other C based languages, a zero followed by a number is not understood to be decimal but octal.
Your 09 is understood as just zero as nine is outside the bounds of octal.
and [syntax="..."] tags where appropriate when posting code. Your post has been edited to reflect how we'd like it posted. Please read: [url=http://forums.devnetwork.net/viewtopic.php?t=21171]Posting Code in the Forums[/url] to learn how to do it too.[/color]
This is the code that i use to put in the array the months names that will gonna be shown in the select box of my html
and [syntax="..."] tags where appropriate when posting code. Your post has been edited to reflect how we'd like it posted. Please read: [url=http://forums.devnetwork.net/viewtopic.php?t=21171]Posting Code in the Forums[/url] to learn how to do it too.[/color]
and [syntax="..."] tags where appropriate when posting code. Your post has been edited to reflect how we'd like it posted. Please read: [url=http://forums.devnetwork.net/viewtopic.php?t=21171]Posting Code in the Forums[/url] to learn how to do it too.[/color]
and [syntax="..."] tags where appropriate when posting code. Your post has been edited to reflect how we'd like it posted. Please read: [url=http://forums.devnetwork.net/viewtopic.php?t=21171]Posting Code in the Forums[/url] to learn how to do it too.[/color]