Re: string to integer conversion
| From: | João Cândido de Souza Neto | Date: | Wed, 15 Mar 2006 12:13:25 +0000 |
| Subject: | Re: string to integer conversion | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-231930@lists.php.net to get a copy of this message | ||
Try this:
$accno="00002927";
$accno=substr("00000000",0,(8-strlen($accno+1))).($accno+1);
I don't test, but i hope it'll work fine.
suresh kumar 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.
>
>
>
> __________________________________________________________
> Yahoo! India Matrimony: Find your partner now. Go to
> http://yahoo.shaadi.com
--
---------------------------------------------------
João Cândido de Souza Neto
Web Developer