Alex Lord
asked on
implode displays array content as array array instead of values
$trackedTreadIDs[] = array(
'id' =>$getThreadIds['id']
);
return implode(',', $trackedTreadIDs) ;
output = testGM: "Array,Array"
it suspose to be two ids but displays array array ?
implode() will implode a simple array, but it looks like you've got an array of arrays. Can't tell what $getThreadIds['id'] is from your code, so you might want to show us more info. That may well also be an array ??
ASKER
not really no, im just trying to get two ids in a single array. than implode it
How about:
$result = implode(',', $getThreadIds['id']);
$result = implode(',', $getThreadIds['id']);
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Open in new window
You are assigning an array to an array. Did you want thisOpen in new window
Or thisOpen in new window
I am guessing the latter - it is the only one that makes sense to use with implode.