about sprintf

Ask about general coding issues or problems here.

Moderators: macek, egami, gesf

New php-forum User
New php-forum User
Posts: 1
Joined: Wed Nov 28, 2012 2:57 am

about sprintf

Postby maries284 » Wed Nov 28, 2012 3:12 am

$balance = sprintf("%.2f", $somevariable);
echo $balance;
I have solution for this. But I dont know the reason. Please tell me the reason.

why we are getting -0.00 instead of 0.00, my intention is to get only 0.00 in this situation. please check and advice me here or mail me.

My mail id: maries.capminds@gmail.com

Return to “PHP coding => General”

Who is online

Users browsing this forum: No registered users and 4 guests