Mailinglisten-Archive |
> Nummer; Stichworte
> 123465; Stichwort1,Stichwort2,Stichwort3
> Nummer; Stichwort
> 123465; Stichwort1
> 123456; Stichwort2
> 123456; Stichwort3
> 987565; Stichowrt2
Beispiel mit Pear-DB:
$rows = $db->getAssoc("SELECT nummer,stichworte FROM tabelle");
$new = array();
foreach ($rows as $nummer => $stichworte) {
$worte = explode(",",$stichworte);
foreach ($worte as $wort) $new[] =
array("nummer"=>$nummer,"wort"=>$wort);
}
lg.
thomas
php::bar PHP Wiki - Listenarchive