Guest User

Untitled

a guest
Jan 15th, 2019
97
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.53 KB | None | 0 0
  1. echo "<form action='index.php' method='post'>";
  2. $tablica = array ('1' =>'jablko|25|13|1',
  3. '2' =>'gruszka|120|123|56',
  4. '3' =>'seler|344|34|167',
  5. );
  6. echo "<table border='2'> <tr> <td>nazwa</td><td>Ilosc</td><td>Cena</td><td>Kalorie</td></tr>";
  7. foreach ($tablica as $x => $y){
  8. $r = explode ("|" , $y);
  9. echo "<TR><TD> {$r['0']}</TD><TD> {$r['1']}</TD><TD> {$r['2']} </TD><TD> {$r['3']}</TD><td><input type='checkbox' name=$x></td>";
  10. }
  11. echo "</table>";
  12. echo"<input type='submit' value='ok'>";
Add Comment
Please, Sign In to add comment