I'm trying to get string from database which is url "http://www.google.com/"
but data I get changed to this http:\ /\ /www.google.com\ /
while($row = mysql_fetch_array($result)){
// temporary array to create single category
$tmp = array();
$tmp["id"] = $row["id"];
$tmp["name"] = $row["name"];
$tmp["url"]= $row["url"];
array_push($response["database"], $tmp);
}
how can I get the url without changed.
mysql_*functions in new code. They are no longer maintained and are officially deprecated. See the red box? Learn about prepared statements instead, and use PDO or MySQLi - this article will help you decide which. If you choose PDO, here is a good tutorial.