What's wrong in this piece of code? I try to use strstr
in an array but I get an error message:
<?php
$url = 'http://' . $_SERVER['SERVER_NAME'] . $_SERVER['REQUEST_URI'];
$array = array("modellini", "modelle");
for (i=0;$i<count($array;$i++))
{
$key = strstr($url,$array[$i]);
$keycap = ucwords($key);
$bodytag = str_replace("-", " ", $keycap);
if (false !== $key)
{
?>
Prova<?php echo $bodytag ?>
<?php
} else {
echo 'No cars.';
}
}
?>
Parse error: syntax error, unexpected '=', expecting ';'
... on this line:
for (i=0;$i<count($array;$i++))