Advertisement
Guest User

Untitled

a guest
Oct 1st, 2012
123
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 0.42 KB | None | 0 0
  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. ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement