hola a todos es que tengo un problema tengo esta consulta
este es mi codifo php
Código PHP:
Ver original<?php
header('Content-type: application/json'); require_once('config.php');
require_once('lib.php');
$sql2 = mysql_query("SELECT tv.*, tipo.* FROM live_tv tv, cat_formato_video tipo WHERE tv.cve_cat_categoria='".$cve_categoria['cve']."' AND tv.status='1' AND tipo.cve=tv.cve_cat_formato_video ORDER BY orden ASC");
if($categoria=="Settings"){
'SDPosterUrl' => "http://oi66.tinypic.com/2cot27a.jpg",
'HDPosterUrl' => "http://oi66.tinypic.com/2cot27a.jpg"
),array( 'Title' => "Favorites", 'SDPosterUrl' => "http://oi61.tinypic.com/14tsu9y.jpg",
'HDPosterUrl' => "http://oi61.tinypic.com/14tsu9y.jpg"
)));
$resultados = $persona;
}
if ($res['epg_ahora']==null) {
$ahora = "Not EPG Found.";
}else{
$ahora = $res['epg_ahora'];
}
if ($res['epg_despues']==null) {
$despues = "Not EPG Found.";
}else{
$despues = $res['epg_despues'];
}
$persona = array( 'ContentId' => $res['cve'], 'Title' => recortar_texto
(utf8_encode($res['nombre']),28), 'SDPosterUrl' => URL_POSTER.$res['poster'],
"HDPosterUrl" => URL_POSTER.$res['poster'],
'StreamBitrates' => $res['streambitrates'],
"StreamFormat" => strtolower($res['formato_video']), "Description" => "<font color=\"#44c767\">NOW </font> ".$ahora."<br><font color=\"#1182a4\">NEXT </font> ".$despues,
"Live" => true,
"StreamUrl" => $res['url_video'],
'ahora' => recortar_texto($ahora,35),
'despues' => recortar_texto($despues,35),
);
$consulta->LiveTV[] = $persona;
$resultados = $consulta;
}
?>
pero me muestra todo los resultado lo unico que no muestra es el cve corecto que puede ser el problema
Tiene que mostrar asi
"ContentId":"1"
"ContentId":"2"
"ContentId":"3"
pero me tira asi
"ContentId":"3"
"ContentId":"3"
"ContentId":"5"