i want to connect to a database server using php , and then echo the data as JSON so later i can use it in android but JSON shows /
as \/
for example
if http://www.google.com/ was in the database
if shows it as
"http:\/\/www.google.com\/" .
i made connections and all and here is how i fetch the data
try {
$stmt = $db->prepare($query);
$result = $stmt->execute($query_params);
}catch (PDOException $ex) {
$response["success"] = 0;
$response["message"] = "Database Error1. Please Try Again!";
die(json_encode($response));
}
while($row = $stmt->fetch(PDO::FETCH_ASSOC))
$array[] = $row;
echo json_encode($array);