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

numerical evaluation of a string

P: n/a
Hi,
is there a way to evaluate in PHP a string like "2+3*5" ? I'm
expecting 17 as a result. A way to achieve that would be to invoke the
bc calculator but I was wondering if you can do such a thing directly
in PHP?
Cheers,
Patrick
Dec 11 '07 #1
Share this Question
Share on Google+
1 Reply


P: n/a
..oO(geantbrun)
>is there a way to evaluate in PHP a string like "2+3*5" ? I'm
expecting 17 as a result. A way to achieve that would be to invoke the
bc calculator but I was wondering if you can do such a thing directly
in PHP?
eval()

Micha
Dec 11 '07 #2

This discussion thread is closed

Replies have been disabled for this discussion.