lundi 4 juillet 2016

PHP - How to get special characters from databse? [duplicate]

This question already has an answer here:

PHP code:

$con = mysqli_connect("localhost", "root", "root", "demoTable");
$query = "select * from demoTable";
$result = mysqli_query($con, $query);
$row = mysqli_fetch_assoc($result);
echo "demo string: ".$row["demoString"];
mysqli_close($con);

Here the string stored in demoTable is This is a demo <string>. But only This is demo is being displayed on the screen. Can anyone please tell me what is the problem here???

Aucun commentaire:

Enregistrer un commentaire