PHP implode multi-dimensional array to string
Depending on your needs you could probably use json_encode 21 and json_decode 7 to achieve similar too, not sure if it might be a bit "lossy" but for arrays it should be ok. You are overwriting
Learning basic and advanced tips and trick on PHP open source language