Re: Problems with split

From: Date: Tue, 14 Aug 2001 00:51:17 +0000
Subject: Re: Problems with split
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-62541@lists.php.net to get a copy of this message
Previously, Ville Mattila said: > --- > $invdate = "14.8.2001"; > echo "$invdate\n"; > list($day, $month, $year) = split(".", $invdate); > echo "$year-$month-$day"; > --- > Somehow, the second echo outputs only "--" as it should be "2001-8-14". > Any idea why this happen and how this could be avoided? Change the third line to read: list($day, $month, $year) = split("\.", $invdate); -dan -- What do you do when you see an endangered animal eating an endangered plant? -George Carlin

« previous php.general (#62541) next »