RsD0p9BK
12/15/2017 - 5:30 AM

PHP json_encode encoding numbers as strings

PHP json_encode encoding numbers as strings

$arr = array( 'row_id' => '1', 'name' => 'George' );
echo json_encode( $arr, JSON_NUMERIC_CHECK ); // {"row_id":1,"name":"George"}

https://stackoverflow.com/a/6608413/2618535