Do I mistake with type of VARIABLES ?

From: Date: Thu, 15 Jun 2000 19:58:57 +0000
Subject: Do I mistake with type of VARIABLES ?
Groups: php.general 
Request: Send a blank email to php-general+get-1986@lists.php.net to get a copy of this message
Hi, guys can anyone tell me why this script prints only the second string ?!? I can't understand exatly but i think that $month is char value and this confuse the script - but why when I make $month+0 - It works ? Where I mistake ? <? $month_name = array( 0=> array ("","Януари","Февруари","Март","Април","Май","Юни","Юли","Август","Септември","Октомври","Ноември","Декември"), 1=> array ("","Яну","Фев","Мар","Апр","Май","Юни","Юли","Авг","Сеп","Окт","Ное","Дек") ); $month=date("m",time()); echo $month_name[0][$month]."|||".$month_name[0][$month+0]; ?> It prints in the browser <html> |||Юни And in my error log: [Thu Jun 15 21:48:15 2000] [error] PHP Warning: Undefined index: 06 in /apache/htdocs/test12.php on line 12 -- Best Regards, Svetlin Simeonov

« previous php.general (#1986) next »