User Tools

Site Tools


kurs:php9.3

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

kurs:php9.3 [2014/09/10 21:22]
kurs:php9.3 [2014/09/10 21:22] (current)
Line 1: Line 1:
 +**explode:​**\\
 +<code php>
 +<?php
 +$tiere = "Hund, Katze, Vogel, Schlange";​
 +$a_tiere = explode(",​ ",​$tiere);​
 +print("<​table border='​1'><​tr><​td>"​);​
 +print(implode("</​td></​tr><​tr><​td>",​$a_tiere));​
 +print("</​td></​tr></​table>"​);​
 +?>
 +</​code>​
 +oder:
 +<code php>
 +<?php
 +$tiere = "Hund, Katze, Vogel, Schlange";​
 +$a_tiere = explode(",​ ",​$tiere);​
 +print("<​table border='​1'>"​);​
 +foreach($a_tiere as $wert){
 + print("<​tr><​td>"​.$wert."</​td></​tr>"​);​
 +}
 +print("</​td></​tr></​table>"​);​
 +?>
 +</​code>​
  
 +**Ausgabe**\\
 +| Hund     |
 +| Katze    |
 +| Vogel    |
 +| Schlange | 
kurs/php9.3.txt ยท Last modified: 2014/09/10 21:22 (external edit)