0
現在、1はMySQLフィールドに改行が含まれています。新しい行でPHPを使って抽出する方法は? MySQLのDB内のフィールドの
PARTICIPATE
These are a few areas which would greatly improve with your participation
すなわち、二つの新しい行があります以下のようなものが含まれています。
しかし、Jsonから抽出すると、新しい行が見つからない、次のようになりました。
{Description: "PARTICIPATE These are a few areas which would greatly improve with your participation"}
function queryPrintJson($cnx, $query) {
$rows=queryReturnJsonArray($cnx, $query);
print json_encode($rows);
}
function queryReturnJsonArray($cnx, $query) {
$result=mysqli_query($cnx, $query) or die ("Can't execute query!");
$rows = array();
while($obj = $result->fetch_object()){
$rows[] = $obj;
}
$result->close();
return $rows;
}
以下のように私のPHPコードは、私は改行を維持することができとにかくありますか? \ nに変換されたら大丈夫です。
ありがとうございます!それは助けて! – Elye