Me ah estado dando error esto ya que quiero recibir datos en JSON desde un array de php
este es mi código
function enter(st){
var tep1 = {
"st" : st
};
$.ajax({
data: tep1,
url: 'system/ob_dd3.php',
type: 'POST',
success:function(data){
RP = JSON.parse(data);
alert(RP[0]);
}
});
}
MI php
include('../../conex/conex.php');
session_start();
$idder = $_SESSION['id'];
$sql1 = "SELECT hs FROM hous WHERE id_user='$idder' ORDER BY hs DESC";
$fs1 = $link->query($sql1);
$datahs= array();
while($rowhs = $fs1->fetch_assoc()) {
array_push($datahs, $rowhs["hs"]);
}
echo json_encode($datahs);
Solo era un error de la bd -__-