Decided to use json_encode instead.