0

I'm querying a mysql database using phpand returning the result in json format to my android application. I have urls stored in my database in this format:

<img src="http://ec2-54-228-87-185.eu-west-1.compute.amazonaws.com/corkgaa/Matchprogrammes/sample1.bmp">

However, the url my android application is receiving is incorrect.

It seems to be putting back slashes infront of every front slash which is causing errors when I'm trying to use it in android.

My php script is:

$result = mysql_query("SELECT * FROM nemo");

while($row = mysql_fetch_assoc($result))
  {
    $output[]=$row;
 }

print(json_encode($output));

mysql_close($con);

Any help would be greatly appreciated! :) Thanks!

4

0 回答 0