i got this Parse error: syntax error, unexpected T_STRING on line 10 in my coding. and line 21 is the same i believe. i was wonder if any1 can help me out, if u have the time that is? this is a fibonacci example that i am trying to do for class.
here is my coding ...
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Untitled Document</title>
</head>
<body>
<?php
$message = ‘The fibonacci sequence is: <br />1<br />2<br />’;
$powerof = 0;
$max = 10;
$temp = $max;
if(isset($POST['power'])) {
$powerof = $POST['power'];}else{$powerof = 2;
}
if($powerof > 100) {
$powerof = 100;
$message = ‘Sorry, your input was too high. I converted it to the maximum value of 100.<br />The fibonacci sequence is: <br />1<br />2<br />’;
}
$i = 1;
for($i;$i<$powerof;$i++){
$max = $max * $temp;
}
$x = 1;
$y = 2;
echo($message);
while($z < $max) {
$z = $x + $y;
echo($z."<br />");
$x = $y;
$y = $z;
}
?>
</body>
</html>