1

I want to allow users to insert values in a form with operators, ​​as in this example.

60*24

I need to know what is the most appropriate way to process this in php

4

1 回答 1

0

您可以为此使用eval函数

一旦你提交表格,就会出现这样的事情

echo eval($_POST['yourtextfieldname']);
于 2013-05-07T11:31:44.077 回答