Hier ist mein php script:
[code]/*
- Following code will list all the products
*/
// array for JSON response
$response = array();
// include db connect class
require_once DIR . ‘/db_connect.php’;
// connecting to db
$db = new DB_CONNECT();
// get all products from products table
$result = mysql_query(“SELECT * FROM quotes ORDER BY quotations + 0 DESC”) or die(mysql_error());
// check for empty result
if (mysql_num_rows($result) > 0) {
// looping through all results
// products node
$response[“feed”] = array();
while ($row = mysql_fetch_array($result)) {
// temp user array
$feed = array();
$feed["quotes_id"] = $row["quotes_id"];
$feed["quote"] = $row["quote"];
$feed["uid"] = $row["uid"];
$feed["nameOfCreator"] = $row["nameOfCreator"];
$feed["imageName"] = $row["imageName"];
$feed["imageForQuote"] = $row["imageForQuote"];
$feed["quotations"] = $row["quotations"];
$feed["created_at"] = strtotime($row["created_at"]);
// push single product into final response array
array_push($response["feed"], $feed);
}
// success
$response["success"] = 1;
// echoing JSON response
echo json_encode($response, JSON_UNESCAPED_UNICODE);
} else {
// no products found
$response[“success”] = 0;
$response[“message”] = “No feed found”;
// echo no users JSON
echo json_encode($response);
}[/code]
aber die Ausgabe sieht so aus:
Wie kann ich das “ä” aus der mysql-Datenbank normal ausgeben lassen?
Vielen Dank.
EDIT:
Das Problem habe ich nur bei bplaced. Bei localhost funktioniert das einwandfrei.