foreach($categories as $category) { print_r($category); }
The above code gives me the following result.
stdClass Object ( [category_Id] => 4 [category_Title] => cat 4 ) stdClass Object ( [category_Id] => 7 [category_Title] => cat 7 ) stdClass Object ( [category_Id] => 6 [category_Title] => cat 6 )
how can i use implode(', ' ) to get the following result:
cat 4, cat 7, cat 6
I used it but got an error
php implode
Afshin
source share