Re: string to integer conversion
| From: | Robin Vickery | Date: | Wed, 15 Mar 2006 12:30:11 +0000 |
| Subject: | Re: string to integer conversion | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-231931@lists.php.net to get a copy of this message | ||
On 15/03/06, suresh kumar <asureshkumar_1983@yahoo.co.in> wrote:
> i am facing one problem in type casting.
> $accno="00002927";
> $accno=$accno+1;
> its o/p is 2928. but i want output to be 00002928.i am
> waiting response from u.
$accno = sprintf('%08d', $accno+1);
-robin