Bluehost.com Web Hosting $6.95

function that appends dollar symbol

This is a discussion on function that appends dollar symbol within the PHP General forums, part of the PHP Programming Forums category; Hi all: The money_format function does not do it for me. Is there a simple php function which appends the '$' ...


Go Back   Usenet Forums > PHP Programming Forums > PHP General

FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #1 (permalink)  
Old 11-23-2003
Joffrey Leevy
 
Posts: n/a
Default function that appends dollar symbol

Hi all:

The money_format function does not do it for me. Is
there a simple php function which appends the '$'
symbol to a string value. Example

$money = 30
$money = some_php_function($money)
echo $money

//should show $30


thanks



__________________________________
Do you Yahoo!?
Free Pop-Up Blocker - Get it now
http://companion.yahoo.com/
Reply With Quote
  #2 (permalink)  
Old 11-23-2003
Robert Cummings
 
Posts: n/a
Default Re: [PHP] function that appends dollar symbol

On Sat, 2003-11-22 at 23:35, John Nichel wrote:
> Joffrey Leevy wrote:
> > Hi all:
> >
> > The money_format function does not do it for me. Is
> > there a simple php function which appends the '$'
> > symbol to a string value. Example
> >
> > $money = 30
> > $money = some_php_function($money)
> > echo $money
> >
> > //should show $30
> >
> >
> > thanks

>
> How 'bout...
>
> $money = '$' . 30;


Hmmm, that's prepending... how about:

$money = 30.'$';

or if he wants it at the beginning:

$money = strrev( strrev( '30' ).'$' );

*heheh*
Rob.
--
..------------------------------------------------------------.
| InterJinn Application Framework - http://www.interjinn.com |
:------------------------------------------------------------:
| An application and templating framework for PHP. Boasting |
| a powerful, scalable system for accessing system services |
| such as forms, properties, sessions, and caches. InterJinn |
| also provides an extremely flexible architecture for |
| creating re-usable components quickly and easily. |
`------------------------------------------------------------'
Reply With Quote
  #3 (permalink)  
Old 11-23-2003
Zerof
 
Posts: n/a
Default Re: function that appends dollar symbol

Please, see:
http://www.php.net/manual/en/function.localeconv.php

and

http://www.php.net/manual/en/function.setlocale.php

-----
zerof
-----
"Joffrey Leevy" <joffrey_leevy3@yahoo.com> escreveu na mensagem
news:20031123042849.25090.qmail@web21502.mail.yaho o.com...
> The money_format function does not do it for me. Is there a simple php function which

appends the '$'
> symbol to a string value. Example

----------
Reply With Quote
Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are Off
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On




All times are GMT +1. The time now is 05:36 AM.


Powered by vBulletin® Version 3.7.3
Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO 3.0.0