This week only. Pastebin PRO Accounts Christmas Special! Don't miss out!Want more features on Pastebin? Sign Up, it's FREE!
Guest

Untitled

By: a guest on Oct 1st, 2012  |  syntax: PHP  |  size: 0.42 KB  |  views: 31  |  expires: Never
download  |  raw  |  embed  |  report abuse  |  print
Text below is selected. Please press Ctrl+C to copy to your clipboard. (⌘+C on Mac)
  1. <?
  2. $shop = array(
  3. array("1", "red", "black", "blue and green"),
  4. array("2", "orange"),
  5. array("2", "pink", "yellow")
  6. );
  7.  
  8. for ($row = 0; $row < 3; $row++)
  9. {
  10.         echo "<li><b>The row number $row</b>";
  11.                 echo "<ul>";
  12.                                 for ($col = 0; $col < 3; $col++)
  13.                                 {
  14.                                         if (in_array($col, explode(' and ', $_GET['filter']))){
  15.                                                 echo "<li>".$shop[$row][$col]."</li>";
  16.                                         }
  17.                                 }
  18.                 echo "</ul>";
  19.         echo "</li>";
  20. }
  21.  
  22. ?>
clone this paste RAW Paste Data