PHP implode_with_key(); Implode array with key and value

Reply to comment

for storing into database look at serialize(), base64encode()