Re: Problem with integers

From: Date: Thu, 14 Sep 2000 05:03:47 +0000
Subject: Re: Problem with integers
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-16705@lists.php.net to get a copy of this message
> Can somebody tell me what I'm doing wrong... I want to KEEP the leading > zeros.. > > echo $row[0]; /*This outputs a number like: 00000015*/ > $val = $row[0] + 1; > echo $val; /*This outputs a number like: 16.. how can i keep the zeros on > there?*/ sprintf("%08d", $row[0]+1) http://www.php.net/manual/function.sprintf.php jason

« previous php.general (#16705) next »