Re: QF - Date leading zeros
| From: | Massimiliano Arione | Date: | Wed, 01 Mar 2006 08:24:34 +0000 |
| Subject: | Re: QF - Date leading zeros | ||
| References: | 1 | Groups: | php.pear.general |
| Request: | Send a blank email to pear-general+get-23176@lists.php.net to get a copy of this message | ||
Mark Steudel wrote:
$_POST['startdate']['M'] = ( $_POST['startdate']['M'] < 10 ? '0'.$_POST['startdate']['M'] : $_POST['startdate']['M']); $_POST['enddate']['M'] = ( $_POST['enddate']['M'] < 10 ? '0'.$_POST['enddate']['M'] : $_POST['enddate']['M']);Overkilled. Use sprintf instead. -- Massimiliano Arione http://garakkio.altervista.org