sandy1028 Posted September 14, 2007 Share Posted September 14, 2007 for($i=0;$i<$cityCount;$i++){ $city = $cityname[$i]; list($count,$centres) = split(":",$centrelist[$city],2); $listCentre = explode(":",$centres); } The problem is when I print $listCentre the output is in 5 arrays. If i use $centres in the query only last centres are considered. How to merge the $listCentre into a single array Link to comment https://forums.phpfreaks.com/topic/69324-arrays/ Share on other sites More sharing options...
sandy1028 Posted September 14, 2007 Author Share Posted September 14, 2007 $listCentr = explode(":",$centres); $listCentr[0] $listCentr[1] $listCentr[2] How to merge these 3 arrays. The merged array sholud be used in querying. Link to comment https://forums.phpfreaks.com/topic/69324-arrays/#findComment-348344 Share on other sites More sharing options...
ToonMariner Posted September 14, 2007 Share Posted September 14, 2007 implode() Link to comment https://forums.phpfreaks.com/topic/69324-arrays/#findComment-348348 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.