Re: Strings with leading zeros

From: Date: Thu, 28 Dec 2000 21:53:48 +0000
Subject: Re: Strings with leading zeros
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-32150@lists.php.net to get a copy of this message
Then I don't understand what you are doing wrong. If your URL is: blah.php?expire=01102001 Then $expire is going to be a string and doing: echo substr($expire,0,2); will definitely return: 01 Perhaps you need to show the exact code that isn't doing what you think it should. -Rasmus On Thu, 28 Dec 2000, Charlie Llewellin wrote: > It comes back to me as a key value pair (expire=01102001) in a URL. It never > gets to my database. I am trying to set a cookie to expire at a future date > based on this field. > > thanks. > > > What is the field type? Is it an integer or a string in the database? > > > > On Thu, 28 Dec 2000, Charlie Llewellin wrote: > > > >

« previous php.general (#32150) next »