Hi all
This formats the numbers as required but it doesn't show a $ sign. How can I make it show one? Thanks!
PHP Code:echo '<td>'.number_format(trim($_transacciones[$i]['total_value'])).'</td>';
| SitePoint Sponsor |



Hi all
This formats the numbers as required but it doesn't show a $ sign. How can I make it show one? Thanks!
PHP Code:echo '<td>'.number_format(trim($_transacciones[$i]['total_value'])).'</td>';
Add a dollar sign to the echo statement, or take a look at http://www.php.net/money-format
Guido - Community Team Advisor
Do you know where the (database) error is? Add it to the list!
Thinking Web: Voices of the Community
Blog - Free Flash Slideshow Widget



Thanks so like this?echo '<td>'.number_format(trim('$',$_transacciones[$i]['total_value'])).'</td>';
Did you try it? That shouldn't work. Try this instead:
echo '<td>$'.number_format(trim($_transacciones[$i]['total_value'])).'</td>';
Guido - Community Team Advisor
Do you know where the (database) error is? Add it to the list!
Thinking Web: Voices of the Community
Blog - Free Flash Slideshow Widget
Bookmarks