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

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to