Thread: String Parsing
View Single Post
  #11  
Old 03-20-2008, 12:13 PM
Programmer Programmer is offline
Coder
Programmer's Avatar
Join Date: Jan 2008
Location: -78.464422, 106.837328
Posts: 449
Programmer has a spectacular aura aboutProgrammer has a spectacular aura about
Send a message via AIM to Programmer Send a message via MSN to Programmer Send a message via Yahoo to Programmer
Quote:
Originally Posted by Tolnaftate2004 View Post
I don't see why we need to parse a string if we're doing simple math...
text*15 or float(text)*15 should suffice, but if there's something I'm missing here, might I recommend this script (though I hate to plug my own script ). It has the necessary code to do this, probably
PHP Code:
temp.result where_param_format("","",whatever_text,15,"times"); 
Not totally sure on this though.

Though, I'm willing to help make a limited eval() if there is enough demand for it.
From what he told me, he's trying to make a text box and allow people to input simple mathematics and variables, and then translate them to return a readable value. The script I posted was merely an example of what he essentially wants done.
__________________
- Iᴀɴ Zɪᴍᴍᴇʀᴍᴀɴ
Reply With Quote