[PHP-DB] Function help....

2002-10-03 Thread Rodrigo
Hi people, i wanna know from you if this is the way to complete a filed with zeros 0... if i type 01 it completes to 0001 function zero4($campo) { if(strlen($campo) == 4) { $status = ok; }else{ while(strlen($campo) 4) { $campo = 0 . $campo; } } } what do you think?

RE: [PHP-DB] Function help....

2002-10-03 Thread Aaron Wolski
Why don't you just try it and see? Aaron -Original Message- From: Rodrigo [mailto:[EMAIL PROTECTED]] Sent: Thursday, October 03, 2002 1:41 PM To: PHP Subject: [PHP-DB] Function help Hi people, i wanna know from you if this is the way to complete a filed with zeros 0... if i type

RE: [PHP-DB] Function help....

2002-10-03 Thread John W. Holmes
Sprintf() or printf() would be better... ---John Holmes... -Original Message- From: Rodrigo [mailto:[EMAIL PROTECTED]] Sent: Thursday, October 03, 2002 1:41 PM To: PHP Subject: [PHP-DB] Function help Hi people, i wanna know from you if this is the way to complete a filed