Ad:
 
  • PHP Discussion Thread
  • Marked Solved
  • Views: 555
  • PHP RSS
Similar Threads
Jul 5th, 2010
0

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

Expand Post »
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..
PHP Syntax (Toggle Plain Text)
  1. if(!isset($_GET['b'])) {
  2. ///// DISPLAY THE NORMAL PROMOTIONAL HOME PAGE
  3. } elseif($_GET['b'] == 't') {
  4.  
  5. $sql = "SELECT * FROM brands";
  6. $setBrand=array();
  7. foreach ($conn->query($sql) as $row) {
  8. $setBrand[]=<<<END
  9. <div class="brandRowM">
  10. <div class="brandRow">
  11. <div class="brand"><a href="#">$row[brand]</a></div><br />
  12. <div class="productSmPic">
  13. <ul>
  14. END;
  15. $sql = "SELECT * FROM products WHERE top = '1' && brand = '".$row['brand']."'";
  16. foreach ($conn->query($sql) as $info) {
  17. $setInfo[]=<<<END
  18. <li><a href="product.php"><img src="$info[PFN1]" width="100px" height="60px" /></a>
  19. <ul>
  20. <li><div class="productSmName">$info[name]</div></li>
  21. <li><div class="productSmCode">$info[icode]</div></li>
  22. <li><div class="productSmRRP">RRP: $$info[cost]</div></li>
  23. <li><div class="productSmQRP">Click to see price</div></li>
  24. </ul>
  25. </li>
  26. END;
  27. }
  28. $setInfo=implode("\r\n",$setInfo);
  29.  
  30. <<<END
  31. </ul>
  32. </div>
  33. </div>
  34. </div>
  35. END;
  36. }
  37. $setBrand=implode("\r\n",$setBrand);
  38.  
  39. }

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

Cheers,
Reputation Points: 10
Solved Threads: 0
Junior Poster in Training
QWaz is offline Offline
57 posts
since Apr 2010
Jul 5th, 2010
0

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

PHP Syntax (Toggle Plain Text)
  1. $setInfo = array();

The above is not declared
Reputation Points: 153
Solved Threads: 229
Nearly a Posting Virtuoso
rajarajan07 is online now Online
1,402 posts
since May 2008

This thread is solved

Either the thread starter or a moderator has marked this thread as solved. You can most likely trust the responses and answers given. There is most likely no reason for any further responses to be posted here. If you have a related question, please start a new thread in this forum instead.
Message:
Previous Thread in PHP Forum Timeline: PHP & HTML
Next Thread in PHP Forum Timeline: Groupe the Name list





About Us | Contact Us | Advertise | Acceptable Use Policy
Build Custom RSS Feed


Follow us on Twitter


© 2010 DaniWeb® LLC