Q:

How to get the key and value from associative array into a one dimensional array

eg.
 ['key' => 'value', 'key2' => 'value2']

to 
 ['key', 'value', 'key2', 'value2']

Also, how do I get comma separated string from said array?

A:

Try to do something like that
 foreach ($yourArray as $key => $value) {  
    echo $key . "&nbsp;" . $value;
 }

It will echo string "key, value, key2, value2"

