FORMAT NUMBER

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
snicolas
Forum Commoner
Posts: 97
Joined: Tue Nov 09, 2004 8:32 am

FORMAT NUMBER

Post 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
User avatar
feyd
Neighborhood Spidermoddy
Posts: 31559
Joined: Mon Mar 29, 2004 3:24 pm
Location: Bothell, Washington, USA

Post by feyd »

sprintf('%05d', $value);


please don't place "urgent" or any other mark such as that in your topic titles.
snicolas
Forum Commoner
Posts: 97
Joined: Tue Nov 09, 2004 8:32 am

Post by snicolas »

cheers feyd, you're the man.....

s
Post Reply