konu json ve php ile bir alt-dizide bir http:// adres çıktısı zaman

0 Cevap php

Im bu gibi bir çıktı elde etmek için çalışıyor

{"status":"ok","0":{"id":"11","title":"digg","url":"http://www.digg.com"}}

ama onun yerine ben bu alıyorum

{"status":"ok","0":{"id":"11","title":"digg","url":"http:\/\/www.digg.com"}}

Bu json oluşturmak için kullanarak php kodu im

$links = array('id'=>'11','title'=>'digg','url'=>"http://www.digg.com");
$msg = array('status'=>'ok',$links);
echo json_encode($msg);

ne herhangi bir fikir bu neden oluyor?

UPDATE i should have been more clear if you notice the actual url, its inserting "\" before the "/" in the output. Is this supposed to happen, or is there a way to stop this?

0 Cevap