I can't echo $arreglo on line 23, the screen is blank. I am trying json encode, but I don't know why is not working. I have checked the conexion and it is ok...
<?php
include ("conexion.php");
$query = "SELECT * FROM usuario WHERE estado = 1 ORDER BY idusuario desc;";
$resultado = mysqli_query($conexion, $query);
if (!$resultado)
{
    die("error");
} 
else
{
    while($data = mysqli_fetch_assoc($resultado))
    {
        //echo $arreglo["data"][]=array_map("utf8_encode", $data);
     $arreglo["data"][] = $data;
    }
    echo json_encode($arreglo);
    mysqli_free_result($resultado);
    mysqli_close($conexion);
}
?>
 
    