The Little Guy Posted September 2, 2008 Share Posted September 2, 2008 $problem = $_GET['problem']; // equals 4+8=y $solveFor = $_GET['solve']; $vals = str_split($problem); //print_r($vals); $str = ''; foreach($vals as $val){ if($val != '='){ $str .= $val.' '; }else{break;} } $str .= ';'; $v = eval($str); echo $v; Why do I get this: Parse error: syntax error, unexpected T_LNUMBER in /home/.marble/ryannaddy/homework.phpsnips.com/process/algerbra.php(13) : eval()'d code on line 1 Link to comment https://forums.phpfreaks.com/topic/122429-solved-unexpected-t_lnumber/ Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.