Quick help using dollar sign..

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
nicolasi18
Forum Newbie
Posts: 3
Joined: Thu Apr 14, 2011 11:42 am

Quick help using dollar sign..

Post by nicolasi18 »

I have a quick question how can I put the dollar sign in front of the numbers?

right now is like this:

12.00 $

'<td onclick="ShowHide(\'sec_'.$prod->serie.'\')" align="right">'.number_format($prod->preco, 2, '.', ',').' $</td>'.

I need this like this:

$12.00

Please help!
User avatar
social_experiment
DevNet Master
Posts: 2793
Joined: Sun Feb 15, 2009 11:08 am
Location: .za

Re: Quick help using dollar sign..

Post by social_experiment »

Code: Select all

<td onclick="ShowHide(\'sec_'.$prod->serie.'\')" align="right">$ '.number_format($prod->preco, 2, '.', ',').' </td>'.
Are you getting any errors (syntax related) from your current code? Something doesn't look correct in there.
“Don’t worry if it doesn’t work right. If everything did, you’d be out of a job.” - Mosher’s Law of Software Engineering
nicolasi18
Forum Newbie
Posts: 3
Joined: Thu Apr 14, 2011 11:42 am

Re: Quick help using dollar sign..

Post by nicolasi18 »

You are the best!! thanks it works perfect. :)
Post Reply