Jsons ajax |
[eluser]Suhas nazir[/eluser]
Hai All I am using ajax for an auto complete operation .Getting the out put smoothly But the problem is i need to return all the value as link so that when i click on the auto complete suggestion it will goes to some other link... The return part is some what like this for ($i=0;$i<count($aResults);$i++) { $display=1; $arr[] = "{\"id\": \"".$aResults[$i]['id']."\", \"value\": \"".$aResults[$i]['value']."\", \"info\": \"\"}"; } if($display) echo implode(", ", $arr); Can anyone tell me to rewrite this so that i can use this return value as a link..
[eluser]dudeami0[/eluser]
You might want to look into the json_encode and http://php.net/manual/en/function.json-d...son_decode[/url] methods of PHP. You could create the link with the return for javascript in codeigniter then pass it on in the json as a 'link' value, then use it in the javascript. Other than that I'm not entirely sure what your asking for. |
Welcome Guest, Not a member yet? Register Sign In |