Having some fun with JSON, PHP and javascript