Q:

PHP logical key/value array separators

I am required to add support for allowing people to create basic primary arrays (no secondary e.g. multi-dimensional arrays).
In the (X)HTML text form I figure I should explode in to arrays using commas and semi-colons as key,value;key,value; pairs. Is this intuitive for other developers if they needed to store an array and if not what separators would you use?

A:

A somewhat natural way of encoding this (for developers at least) is to apply URL-encoding:
key1=value&key2=value

On the server side, you can then use parse_str() to decode it.

