Mailinglisten-Archive |
elias wrote: > >> Die erste dimension also "k..." sind viele, und variabel, so das ich >> die da >> nicht so fix reinschreiben kann. > > > $arr_raw["k1"][0] = "AAA"; > $arr_raw["k1"][1] = "AAAAAA"; > $arr_raw["k2"][0] = "BBB"; > $arr_raw["k2"][1] = "BBBBBB"; > $arr_raw["k3"][0] = "CCC"; > $arr_raw["k3"][1] = "CCCCCC"; > $arr_raw["k4"][0] = "DDD"; > $arr_raw["k4"][1] = "DDDDDD"; > > $arr_merged = array(); > $arr_values = array_keys($arr_raw); > for ($i = 0; $i < count($arr_raw); $i++){ > $arr_merged = array_merge($arr_merged, $arr_raw[$arr_values[$i]]); > } > > :)=) $arr_merged = array(); foreach ( $arr_raw as $_array_raw ) { $arr_merged += $_array_raw; } ... ungetestet, müsste aber gehen -- Sebastian Mendel (www.sebastianmendel.de) *www.warzonez.de* | www.tekkno4u.de | www.nofetish.com
php::bar PHP Wiki - Listenarchive