php - how to format json with array of json -
i want output in json this
response:{url="www.google.com/raj.png", size=12.344kb},{url="www.google.com/raj2.png", size=12.344kb},{url="www.google.com/raj4.png", size=12.344kb}
but getting
"url=> www.google.com/img1.png size => 12.344 kb,url=> www.google.com/img2.png size => 12.344 kb"
//using loop here { $response[] = array('url' => 'url_value','size' => 'file_size'); } //without loop hardcoded values: $response = array ( array('url' => "www.google.com/raj.png",'size' => "12.344kb"), array('url' => "www.google.com/img2.png",'size' => "10.344kb") ); return json_encode($response);
Comments
Post a Comment