954,174 Members — Technology Publication meets Social Media
Username:
Password:
Lost login information?
Have something to say? Contribute New Article Reply to this Article

Warning: implode() [function.implode]: Invalid arguments passed

Hi,

I am getting this error:
Warning: implode() [function.implode]: Invalid arguments passed in ... on line 28

I am not sure if what I am doing is possible or if I have shanked the code somehow..

if(!isset($_GET['b'])) {
		///// DISPLAY THE NORMAL PROMOTIONAL HOME PAGE
} elseif($_GET['b'] == 't') {

$sql = "SELECT * FROM brands";
$setBrand=array();
foreach ($conn->query($sql) as $row) {   
$setBrand[]=<<<END
	<div class="brandRowM">
		<div class="brandRow">
			<div class="brand"><a href="#">$row[brand]</a></div>
			<div class="productSmPic">
				<ul>
END;
	$sql = "SELECT * FROM products WHERE top = '1' && brand = '".$row['brand']."'";
			foreach ($conn->query($sql) as $info) {   
			$setInfo[]=<<<END
					<li><a href="product.php"><img src="$info[PFN1]" width="100px" height="60px" /></a>
						<ul>
							<li><div class="productSmName">$info[name]</div></li>
							<li><div class="productSmCode">$info[icode]</div></li>
							<li><div class="productSmRRP">RRP: $$info[cost]</div></li>
							<li><div class="productSmQRP">Click to see price</div></li>
						</ul>
					</li>
END;
			}
			$setInfo=implode("\r\n",$setInfo);

<<<END
				</ul>    
			</div>        
		</div>
	</div>
END;
	}
	$setBrand=implode("\r\n",$setBrand);

}


I have been trying to get this work for a while now, so any help would be SSOOOO appreciated.

Cheers,

QWaz
Junior Poster in Training
62 posts since Apr 2010
Reputation Points: 10
Solved Threads: 0
 
$setInfo = array();


The above is not declared

rajarajan07
Nearly a Posting Virtuoso
1,447 posts since May 2008
Reputation Points: 167
Solved Threads: 239
 

This question has already been solved

Post: Markdown Syntax: Formatting Help
You