ironlady wrote:wow!!!!!!
Thanks!
ironlady wrote:Only two things: the tone number 5 (some people use it for neutral tone) remains after the * is added to denote neutral tone, and the second tone in TOP is last letter capitalized ,all others small (right now it's first small, others cap).
I think I fixed this now.
ironlady wrote:Can you share the source? I'd love to learn just how you did that (and so fast!!!)

Of course! This should be downloadable (is that a word?):
http://www.hypermegaglobal.net/TOP/input.htm.txthttp://www.hypermegaglobal.net/TOP/makeTOP.php.txtironlady wrote: (I'm just learning basic .php for my own and my husband's Web sites, so most of what I do is read, imitate and modify.)
This sounds very efficient, but isn't the best thing about programming that you're free to find your own solution and implement it? I must warn you, once you've seen my apporach, you can't unsee it. It's so terribly simple!
Please have a good look at the very beginning of function NumberedToTOP where I define the arrays. Due to my puny knowledge of Chinese, there might be some mistakes or superfluous entries.
Furthermore, it's probably more user-friendly to have the form call itself (the result of the conversion would be shown on the same page as the input field).
Finally, as an alternative to computing $AllSyllablesAndTones every time the time the function is called, you could also output it in a way that matches PHP's array defining syntax ("ba"=>"ba*","ba1"=>"BA", etc.) and then simply define the array instead of computing it. Then you could tell people you spent a year writing the list of equivalents by hand.
Any questions, don't hesitate to ask.