I want to insert an array into my MySQL database in the format a,b,c.
`var_dump($pvt_contacts)`
results
array(1) { [0]=> array(2) { [0]=> string(3) "102" [1]=> string(1) "3" } }
I tried
`implode(',',$pvt_contacts)'
but it echos Array not 102,3 as I expected . Please help me
If you just want
102,3, then you’re off by one (your pointing to a parent array, and not the elements):serialize. (despite its prevalence in Drupal, ExpressionEngine, WordPress, etc. this is not generally the best idea).json_encode.