I am saving operators(+,-,*) in mysql table have type varchar i have problem when in puting the values in formul e.g
$val1=7;
$val2=+;
$val3=5;
$val4=-;
$val5=9;
$ans=$val1.$val2.$val3.$val4.$val5;
the output is:
7+5-9
but i want to perform the action and give me the result 3
how to do?



Reply With Quote







Bookmarks