Array ( [0] => Array ( [admin_name] => Bilal ) [1] => Array ( [admin_name] => shankar ) )
i need this result like
bilal,shankar
how can i do this type of result
i’m using foreach
foreach($result as $res)
{
echo $res[‘admin_name’];
}
but i got the result like
bilalshankar
how can i split 2 name’s
chorn
2
put them in an array and use implode()
on it
echo implode(‘,’,$users[‘admin_name’]);
found this error:
Warning: implode(): Invalid arguments passed in
I got the result i use this format
foreach ($viewer_name as $users)
{
echo $users[‘admin_name’].“,”;
}
chorn
5
due to the trailing comma, this is not the result you mentioned.
This is from you first post, but in the implode
you use $users['admin_name']
.
Which is it?
system
Closed
7
This topic was automatically closed 91 days after the last reply. New replies are no longer allowed.