Parse error: parse error, unexpected T_INC, expecting ')' in c:\inetpub\wwwroot\states.php on line 11
I cannot find this error anywhere. I know it says line 11, but when I remove that for statement, it still shows as a parse error on line 11. Does anyone see where I missed anything?
<?php
$states[0] = $_POST["states0"];
$states[1] = $_POST["states1"];
$states[2] = $_POST["states2"];
$states[3] = $_POST["states3"];
$states[4] = $_POST["states4"];
$states[5] = $_POST["states5"];
$states[6] = $_POST["states6"];
$states[7] = $_POST["states7"];
for ($x=3;$x<=sizeof($states);x++){
$usrinput[$x] = $states[$x];
}
echo "You put in the following data.";
for ($x=0;x<=sizeof($usrinput);x++){
echo $usrinput[x] . "<br>";
}
echo "This is the information you put in, in alphabetical order";
sort($usrinput);
for ($x=0;x<=sizeof($usrinput);x++){
echo $usrinput[x] . "<br>";
}
$cond1 = "xas";
for ($x=0; $x < sizeof($states); $x++)
{
if(substr($states[$x],strlen($states[$x]) - strlen($cond1)) == $cond1)
{
$states[0] = $states[$x];
echo "Match Found in \$states[" . $x . "] for *xas<br>";
}
else
{
echo "No Match in \$states[" . $x . "] for *xas<br>";
}
}
echo "<h1>Searching...</h1>";
$cond2 = "k";
$cond3 = "s";
for ($x=0; $x < sizeof($states); $x++)
{
if (preg_match("/^${cond2}.*${cond3}$/i",$states[$x]))
{
$states[1] = $states[$x];
echo "Match Found in \$states[" . $x . "] for k*s<br>";
}
else
{
echo "No Match in \$states[" . $x . "] for k*s<br>";
}
}
$cond4 = "M";
for ($x=0; $x < sizeof($states); $x++)
{
if(substr($states[$x],0,1) == $cond4)
{
$states[2] = $states[$x];
echo "Match Found in \$states[" . $x . "] for M*<br>";
}
else
{
echo "No Match in \$states[" . $x . "] for M*<br>";
}
}
echo $states[3] . "<br>";
echo $states[4] . "<br>";
echo $states[5] . "<br>";
echo $states[6] . "<br>";
echo $states[7] . "<br>";
echo $states[0] . "<br>";
echo $states[1] . "<br>";
echo $states[2] . "<br>";
echo "Complete listing...";
for ($x=0; $x < sizeof($states); $x++)
{
echo $states[$x] . "<br>";
}
sort($states);
for ($x=0; $x < sizeof($states); $x++)
{
echo $states[$x] . "<br>";
}
?>