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)).")"; 

working demo

explanation :

you can't directly use implode() on md array. use array_map() grab values num key , subject implode().


Comments

Popular posts from this blog

c++ - How to add Crypto++ library to Qt project -

jQuery Mobile app not scrolling in Firefox -

How to use vim as editor in Matlab GUI -