Monday 15 July 2013

I have an array but how do i now insert as csv values php mysql -



I have an array but how do i now insert as csv values php mysql -

i have print_r

array ( [jform] => array ( [itinerary] => array ( [0] => 1 [1] => 2 ) ) )

i have code , bit

foreach($_post $value) { $extradata[] = $value; } $extradata = implode(',',$extradata); $updatentry="update #__tours set itinerary='$extradata' id='$id'"; $db->setquery($updatentry); $db->query();

i can not array produce 1,2 can update row.

cheers in advance jonny

sounds wanna like:

$extradata = implode(',', $_post['jform']['itinerary']);

basically wanna implode() child-array has no more children.

php mysql arrays csv

No comments:

Post a Comment