Problems with split
| From: | Ville Mattila | Date: | Tue, 14 Aug 2001 00:43:03 +0000 |
| Subject: | Problems with split | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-62527@lists.php.net to get a copy of this message | ||
Hi there,
First the code:
---
$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?
Thanks,
- Ville