Quantcast
Viewing all articles
Browse latest Browse all 14

Answer by Hardik Raval for Fastest way to implode an associative array with keys

echo implode(",", array_keys($companies->toArray()));

$companies->toArray() -- this is just in case if your $variable is an object, otherwise just pass $companies.

That's it!


Viewing all articles
Browse latest Browse all 14

Trending Articles