ios - swift unable to parse php data -
i have been trying fetch values database through poststring , doesn't return value. php tested , working fine, appreciated. below code. import uikit class displaydetailedviewcontroller: uiviewcontroller { var role = string() var date = string() var city = string() var mark_ref = string() override func viewdidload() { super.viewdidload() } override func didreceivememorywarning() { super.didreceivememorywarning() } func getdata(){ let myurl = url(string:"http://xxxxxx.co.in/xxxxx/show_report1.php") var request = urlrequest(url: myurl! url) request.httpmethod = "post" let poststring = "city=\(city)&date=\(date)&market_rep=\(mark_ref)" request.httpbody = poststring.data(using: string.encoding.utf8) let task = urlsession.shared.datatask(with: request) { (data: data?, response: urlresponse?, error: error?) in dispatchqueue.mai