note 93381 added to function.ltrim

From: Date: Sun, 06 Sep 2009 23:53:13 +0000
Subject: note 93381 added to function.ltrim
Groups: php.notes 
Request: Send a blank email to php-notes+get-160268@lists.php.net to get a copy of this message
@John Sherwood: to me: <?php $bsn = preg_replace('/\D/', '', $_POST['bsn']); // Strip any non-digit $bsn += 0; // easy way to trim padding zeroes ?> doesn't do the same as: <?php $bsn = ltrim(preg_replace('/\D/', '', $_POST['bsn']), "0"); // Strip any non-digit + left padding zeroes ?> so I guess , the += 0 trick doesn't work well. ---- Server IP: 83.137.20.135 Probable Submitter: 62.195.2.204 ---- Manual Page -- http://www.php.net/manual/en/function.ltrim.php Edit -- https://master.php.net/note/edit/93381 Del: integrated -- https://master.php.net/note/delete/93381/integrated Del: useless -- https://master.php.net/note/delete/93381/useless Del: bad code -- https://master.php.net/note/delete/93381/bad+code Del: spam -- https://master.php.net/note/delete/93381/spam Del: non-english -- https://master.php.net/note/delete/93381/non-english Del: in docs -- https://master.php.net/note/delete/93381/in+docs Del: other reasons-- https://master.php.net/note/delete/93381 Reject -- https://master.php.net/note/reject/93381 Search -- https://master.php.net/manage/user-notes.php

« previous php.notes (#160268) next »