Syntax error

Hi,

Can anyone spot the error here?

The error I’m getting is:
PHP Parse error: syntax error, unexpected T_STRING in



$result = $this->query($this->getBrandsQuery());
		$pattern_array = array("SALA","Protecta");
		$first = 0;
		while($row = $this->fetch_assoc($result)){
		foreach ($pattern in $pattern_array) //ERROR on this line?
		{
			if(preg_match("/\\b".$pattern."\\b/i", $row['brandName'])){
				if($first == 0){
					$listItems[] = '
			<li><a href="#" class="drop-product">'.$id.'</a></li>';
					$first = 1;
				}
				$listItems[] = '
....

I can’t seem to figure it out.

Thanks,
Rhys

http://www.php.net/manual/en/control-structures.foreach.php

check the syntax of your foreach

Ah yes, thanks.