string

From: Date: Mon, 17 Jun 2002 13:25:58 +0000
Subject: string
Groups: php.general 
Request: Send a blank email to php-general+get-102503@lists.php.net to get a copy of this message
I have a problem which I'm sure will be easily resolved by someone with a bit more PHP know-how than me. I have a variable passed into my script called '$productid'. The Javascript I am using to pass the variable removes the 0 from the beginning of the variable. The 0 is necessary because I use it to update records on a database with an ID number which includes a 0. My question is, how do I combine the variable '$productid' with 0 so that it will come out with a 0 in front? For example; '$productid' is passed into the script with the value 8. How do I combine this so that $productid becomes 08? Thanks in advance, Phil Reid

« previous php.general (#102503) next »