PHP JSON encode output number as string

You could also try

echo json_encode( $results, JSON_NUMERIC_CHECK );

Some reference:

PHP JSON constants

Leave a Comment