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 Quote 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. Quote 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() Quote Link to comment https://forums.phpfreaks.com/topic/69324-arrays/#findComment-348348 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.