php - how to implode the following array for $val = explode(",".$number) -
array ( [0] => array ( [num] => 338975270 ) [1] => array ( [num] => 4542682328 ) )
now want use implode function output :
(338975270,4542682328)
you should ..
echo "(".implode(',', array_map(function ($v){ return $v['num'];},$yourarray)).")";
explanation :
you can't directly use implode()
on md array. use array_map()
grab values num key , subject implode()
.
Comments
Post a Comment