conectarse a la base de datos y realizar consultas SQL

<?php 
//Connecting to the database
$conn =  mysqli_connect('localhost', 'root', '', 'peroHub');

if(!$conn){
    echo "Error in connection: " . mysqli_connect_error();
}

$sql = 'SELECT title, ingredients, id FROM pizzas';

$result = mysqli_query($conn, $sql);


$pizza = mysqli_fetch_all($result, MYSQLI_ASSOC);

//free result from memory
mysqli_free_result($result);

//close connection
mysqli_close($conn);

// print_r($pizza);


?>