Sponsored by Dragon Age: Origins
See the new YouTube feature trailer for Dragon Age: Origins view!
youtube.com/DragonAge - EA presents BioWare's new dark fantasy epic Dragon Age: Origins. '9/10' from Game Informer.
33 Comments
- andyyDev, on 11/11/2007, -0/+6The script is pretty nice. But what if you want to use THE LATEST currency conversion rates ?
here is a script that does it all: http://andyydev.com/project.php?file=MoneyConv (free for personal use) - l4dyluck, on 11/12/2007, -2/+8very cool adam
- rYno, on 11/11/2007, -0/+3heh.. I was thinking the same as andyyDev. Can't you pull the current exchange rates from like xe.com or something? That would be cooler, but nice guide.
- Wildhoney, on 11/11/2007, -0/+3I'll write the next guide on the POST, and may even look into a currency converter API :)
- Thomaschaaf, on 11/11/2007, -1/+4Nice beginners tut. Still liked reading how others do it :)
- breefield, on 11/19/2007, -0/+2Uggg...I noticed that right after I posted it and after the time ran out to edit it...
I wanted to correct it so bad...but I couldn't...oh well
Should be 'write' - stevensj2, on 11/12/2007, -3/+5I didn't realize Digg was designed for the PHP elite.
Oh wait..that is because it isn't. Sure, it is basic, simple, but for some people, that is nice. For others like yourself...I suppose it is "lowly."
Well, if you have a moment, sir, you might be better off directing your high horse to a site that IS specifically for programming. You can discuss how you found a tutorial catered to mere mortals and ants over at Sitepoint.com.
Thanks! - inactive, on 11/11/2007, -1/+3Why is the oh so precious US dollar lower than all the other currencies? :p
- breefield, on 11/19/2007, -0/+2Yea, but his tutorial is good for beginners. It's not some extravagant one that pulls it's conversion rates dynamically.
Nice script though.
+1 digg - springo, on 11/13/2007, -0/+2You could parse xe.com's website to get the latest rates, but that would be slightly more difficult for beginners.
- dbr_onix, on 11/13/2007, -0/+2Erm, not really. A tutorial that teaches how to multiply two numbers would be:
echo(432 * 63);
It's not so much about the maths involved, it is about the locale stuff.. If you find this stuff obvious, it's not intended for you. - Filter, on 11/11/2007, -3/+5I just helped a friend in college right something close to this in C. You would be surprised at how often something like this might be useful.
- Matt2k, on 11/11/2007, -0/+1I sympathize with you man. I've done the same, and worse. Sending a message to a professional mailing list of thousands and spotting just as you click send, the draft sentences you forgot to edit out. Maybe not as bad as Site -> Sight, but still some red cheeks.
- Hamsterpotpies, on 11/11/2007, -3/+4Very simple but very useful at the same time. Thanks!
- AK444, on 11/13/2007, -0/+1Find Useful PHP video lessons at http://freevideolectures.com/
- breefield, on 11/19/2007, -3/+4Not too hard a script to wright, but it's a good jump off point for people who want to get into PHP and don't know what to build after they've learned the syntax. After that tutorial you could show them how to use a form to submit the page back to itself and catch the POST variables so that the currency changes with what the user wants to see.
- andyyDev, on 11/12/2007, -0/+0apparently you can get their rates in form of a feed .... but NOT for free !
- yogastore, on 06/27/2008, -0/+0http://astore.amazon.com/aerobed.premier.queen-20
http://astore.amazon.com/aerobed.raised-20
http://astore.amazon.com/braun.10.cup.coffee.maker ...
http://astore.amazon.com/programmable.coffee.maker ...
http://astore.amazon.com/bissell.steam.mop-20
http://astore.amazon.com/steam.cleaner.mop-20
http://astore.amazon.com/cotton.sateen.duvet-20
http://astore.amazon.com/5.gallon.water.bottle-20
http://astore.amazon.com/camelbak.water.bottle-20 - loconet, on 11/14/2007, -5/+5greenie is right. All this "tutorial" "teaches" is how to multiply two numbers. If you can't figure out how to do this on your own in *any* language, you have no business programming.
- pelline, on 11/11/2007, -1/+1pretty simple, but very good explained, dugg.
- marike, on 11/12/2007, -0/+0The script doesn't seem very portable, and in fact fails on OS X Leopard. The problem seems to be the 'define' constants set-up in the beginning:
define('CURRENCY_CAD', 'english-can');
define('CURRENCY_EUR', 'german');
define('CURRENCY_GBP', 'english-uk');
define('CURRENCY_USD', 'american-english');
Because these fail and return an empty string for the value of 'int_curr_symbol' in the Array returned by the line: $aLocale = localeconv();
Which in turn causes this line: $iExchangeRate = $aExchangeRates[trim($aLocale['int_curr_symbol'])]; to return Notice: Undefined index and the function to return 0.00.
If I set the define statements to:
// define('CURRENCY_CAD', 'en_CA.UTF-8');
// define('CURRENCY_EUR', 'de_DE.UTF-8');
// define('CURRENCY_GBP', 'en_GB.UTF-8');
// define('CURRENCY_USD', 'en_US.UTF-8');
the function seems to work OK. Writing cross-platform scripts can be hard. From what I've read, in this case I think it has to do with how different systems set the function setLocale. - asdfuku, on 11/12/2007, -0/+0They made no reference to http://us2.php.net/money_format which could ease the output at least...
- kjohn22066, on 12/03/2007, -0/+0Free PHP books (100% free):
http://freecomputerbooks.com/webPhpBooksIndex.html - king52, on 05/08/2008, -1/+1search free pdf books http://ebooknetworking.net
- nebravski, on 02/17/2008, -0/+0Can someone help me.I want to create a currency converter.Please mail me an example (php) on this mail nebravski@yahoo.com thanks :)
- greeniemeani, on 11/14/2007, -6/+5Uhm...what is so special about writing PHP code that multiplies two numbers? The rates are changing every day - who is going to use a hard-coded array anyways? Do we really need to see this beginners stuff on Digg?
- gbudavid, on 11/12/2007, -5/+4Cool.
- oliver75482, on 11/11/2007, -3/+2A very nice and useful guide.
- gwp123, on 11/11/2007, -4/+2Amazing!
Well done. - greeniemeani, on 11/12/2007, -4/+1I guess someone can take the next step up from mere PHP Peon to Mighty PHP Elite once he/she has mastered multiplication and arrays. It IS pretty tricky that you have to use an asterik (*) instead of an x to multiply things!
- Yarnage, on 11/12/2007, -4/+1Wright? Soryr but I can't digg you up for that one...
- andyyDev, on 11/11/2007, -3/+0thanks :)
- Tantalon, on 11/11/2007, -8/+2i like it
i digg it


What is Digg?
Browsing Digg on your phone just got easier with our enhancements to the