Jump to content

[SOLVED] unexpected T_LNUMBER


The Little Guy

Recommended Posts

$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

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.