URGENT: Build multidimensional array from mutliple preg_match_all().
Posted on 2004-07-30
This problem is both a little difficult (at least for me) and it is also extremely urgent:
I'm parsing a html-string from a fetched page with "preg_match_all()" several times.
preg_match_all("/[0-9]*\) <font/", $html, $id_matches); ==> ARRAY $id_matches containing ids: (1,2,3,4,5,6)
preg_match_all("/[a-z]*\) <font/", $html, $name_matches); ==> ARRAY $name_matches containing names: (dick,phil,jack,john,jim,bob)
preg_match_all("/[a-z]*\) <font/", $html, $adress_matches); ==> ARRAY $adress_matches containing names: (elm street,paper street,gotham street,lake drive,arlington road,downing street)
how do I build a multidimensional array from that?
id | name | adress
1 | dick | elm street
2 | phil | paperstreet
and so on...