note 14585 deleted from function.str-pad by cmb

From: Date: Mon, 31 Aug 2015 21:04:43 +0000
Subject: note 14585 deleted from function.str-pad by cmb
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-203542@lists.php.net to get a copy of this message
Note Submitter: matthew dot somerville at trinity dot oxford dot ac dot uk ---- I find: $mystr = substr("0000$mystr",-4) (where the 0s are padding characters and -4 is the negative of the maxlength to pad to) is even simpler.

« previous php.notes (#203542) next »