
Originally Posted by
Salathe
Off Topic:
PHP 5.5.0 might get a new function,
array_column(), that would make life easier here:
echo implode(', ', array_column($array, 'job_type'));
Off Topic:
Yes, indeed, though he might be simplifying the example some here. In any event, if those strings contain commas (and they're free form it seems so they could) implode isn't the right tool, even with array_column
Who said anything about converting the string back to an array?
That more often going to be the case than not. He hasn't mentioned why he's doing this, so I have no point of reference here.
Bookmarks