Page 1 of 1

FORMAT NUMBER

Posted: Mon Feb 07, 2005 11:01 am
by snicolas
hI gUYS,

sORRY I KNOW IT'S 5 PM HERE BUT I NEED SOME HELP

I have a variable containing value as
$value=5;

I need to insert this value in my db (SQLS ERVER) as 00005.

I know i should use Format() but i am not sure about the way to do it.

thx in advance

s

Posted: Mon Feb 07, 2005 11:07 am
by feyd
sprintf('%05d', $value);


please don't place "urgent" or any other mark such as that in your topic titles.

Posted: Mon Feb 07, 2005 11:09 am
by snicolas
cheers feyd, you're the man.....

s