Answers for "html php mo encoding utf-8"

PHP
0

php set utf8 encoding

<?php
$mysqli = new mysqli("localhost","my_user","my_password","my_db");

if ($mysqli -> connect_errno) {
  echo "Failed to connect to MySQL: " . $mysqli -> connect_error;
  exit();
}

echo "Initial character set is: " . $mysqli -> character_set_name();

// Change character set to utf8
$mysqli -> set_charset("utf8");

echo "Current character set is: " . $mysqli -> character_set_name();

$mysqli -> close();
?>
Posted by: Guest on November-01-2020
1

html set encoding utf 8

<head>
  <meta charset="UTF-8">
</head>
Posted by: Guest on September-02-2021

Browse Popular Code Answers by Language