Imploding array giving extra symbols in PHP

I am having an array which is also having some blank space and because of those blank spaces, when I imploding the array it is giving me extra comma. Please take a look at my code and suggest me how can I get rid of it.

$xrd = implode(',', $admin_array);}

//Output is ,12,62,,76,,,45,,
//Output should be 12,62,76,45


from Recent Questions - Stack Overflow https://ift.tt/3i6nDWH
https://ift.tt/eA8V8J

Comments

Popular posts from this blog

Today Walkin 14th-Sept

Spring Elasticsearch Operations

Hibernate Search - Elasticsearch with JSON manipulation