By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
438,664 Members | 1,623 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 438,664 IT Pros & Developers. It's quick & easy.

Combining numbers and strings for math

P: n/a
gf
I'm sure I'll slap my forehead when I see the answer, but it is sure
escaping me!

$field1 = 100; //Some number
$field2 = '/10'; //An operand and a divisor

I need $result = to be a numeric representation of 100/5 = 20.

I have fiddled with concatonation and eval() and haven't figured it out yet.
What's the answer?

Thanks.
--
Gaylen
Raven Web Hosting http://ravenwebhosting.com
PHP KISGB PHP Guest Book for Standard and phpNuke sites
http://www.gaylenandmargie.com/phpwebsite
PHP KISSQ PHP Stock Quote for Standard and phpNuke sites
http://www.gaylenandmargie.com/phpwebsite
Jul 16 '05 #1
Share this question for a faster answer!
Share on Google+

This discussion thread is closed

Replies have been disabled for this discussion.