The SitePoint Forums have moved.

You can now find them here.
This forum is now closed to new posts, but you can browse existing content.
You can find out more information about the move and how to open a new account (if necessary) here.
If you get stuck you can get support by emailing forums@sitepoint.com

If this is your first visit, be sure to
check out the FAQ by clicking the
link above. You may have to register
before you can post: click the register link above to proceed. To start viewing messages,
select the forum that you want to visit from the selection below.

Hi
when you say its possible to convert PHP to javascript How ?
manually or is their a programme that will do it automatically,
Beggars can't be choosers but I don't hold a lot of faith in auto coders, I play around with HTML and have two editors one do it all no coding experience needed Jobie and the other a basic editor, and the extra code put in by the auto coding editor is mad and some what confusing,
anyway here is the code in PHP any pointers as to how one converts it to good old JS would be much welcomed:

What can I say, I'm like a kid in toy shop,
Loads of scripts to play and mess about with, I haven't yet tried them but will do straight after this message,
I would just like to say a big public thanks to:

Sorry but all I keep getting is "undefined dollars and undefined cents"

other results are :

0 = zero, 1 = dollar (not one dollar), 2 = dollars (not two dollars)

all other (known) numbers input just return "undefined dollars and undefined cents"
I'm not sure if its me or the javascript code thats wrong could someone pass there expert eye over it for me,
I've been playing with it and not getting anywhere,
any advice much appreciated.

It looks like it works fine in Firefox but on IE it doesn't because the script is trying to access parts of a string by using an array notation.

The version that I transcribed from PHP to JavaScript works properly across both Firefox and IE.
The sprintf (which required a separate library) has been eradicated from the code now, as parseFloat(numval).toFixed(2) achieves the same desired result.

IE doesn't support JavaScript, but uses it's own, proprietary thing called JScript. As usual, it's a bad clone of something else.
If you replace the array notation for strings with the .charAt() function, it should work:

Top Christmas Present guys, Crack open a beer, you've both earned it,
both scripts work in IE and Opera, I don't have firefox, its hard to know who is using what browser, I've had problems with IE compatibility before,
how can one of the leading browsers avoid such basic standards,
its about time they all got a kick up the backside and got their act together.
I bet you have both said this a few times.

It's both, actually. There were two parts in that complaint. One is that IE is too tightly bound to Windows, so that you can't uninstall it. The other part was asking the EC to require Microsoft to support web standards. It's difficult for other browser vendors when they have to emulate undocumented behaviour in IE, in order to be render the millions of badly written web pages that rely on IE bugs and quirks.

I agree that it's a good sign that an internal build of IE8 has passed the Acid2 test, though. Unfortunately it won't do any good for the millions and millions of IE6 users out there who cannot upgrade because they run Win XP or older.

Great news if it all goes to plain, but you know how long the bureaucratic way takes, we will probably all be in our boxes by then

Do you not think there will be an upgrade for IE8, I run XP (for my sins) and upgraded from IE6 to IE7 with no problems, except for the usual slow loading bug ridden MS software, that we all have come to live with,
why do we have to load tons of rubbish onto our hard drives that we will never use, like 30 different language etc. most folk don't even know half of whats on the computer and don't care.
my first computer (if you can call it that) was a Vic 20 three and a half k internal memory and took years to load anything on it via cassette.
but because memory was tight code was more slick,
now it's just bulk junk code with most of the software, and of course machine code was use for size and speed then, I wonder how mush faster windows would run in machine code ?

I've tried adding IF statements but not getting anywhere I've managed to

reverse twenty one, to einundzwanzig (1&20) with little trouble, but with the French the 20&1 thing is only for 21, 31, 41, 51, 61,
then 71 is 60+11 (soixante onze) so you can see my need for exceptions

Did you try out my example at all? It would not be too difficult to extend it to support multiple languages, but obviously you'd need to have a really good understanding of the rules for each language. Here's my original example, modified slightly to show how you could support multiple languages: