我有这个代码 php
$query2 = "SELECT * FROM hosts where cod='$stream'";
$result2=mysql_query($query2);
while ($row2=mysql_fetch_array($result2))
{
$audio=$row2['audio'];
$def=$row2['def'];
$hosty=$row2['host'];
}
我如何以这种格式将结果转换为 json :
var sources = {"english":{"360":["bayfiles","filebox","zalaa","cramit"],"720":["cramit","180upload"]},"portugues":{"1080p":["zalaa","cramit"],"720":["cramit","180upload"]}}
有可能吗?
谢谢