Created
December 26, 2018 05:36
-
-
Save parzibyte/a76e844c39a73c7ac878bfcc7642efbe to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
$numero = 123.20; | |
// A veces esto sale como cadena "123.20": | |
echo json_encode($numero); | |
# Por eso lo forzamos a que sea número | |
echo json_encode($numero, JSON_NUMERIC_CHECK); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment