1
2<?php
3
4$mysqli = mysqli_connect("example.com", "user", "password", "database");
5
6$result = mysqli_query($mysqli, "SELECT 'A world full of ' AS _msg FROM DUAL");
7$row = mysqli_fetch_assoc($result);
8echo $row['_msg'];
9
10$mysqli = new mysqli("example.com", "user", "password", "database");
11
12$result = $mysqli->query("SELECT 'choices to please everybody.' AS _msg FROM DUAL");
13$row = $result->fetch_assoc();
14echo $row['_msg'];
15
16