• Fetch mysql results into an array using PHP

    .

    Learn a bit of PHP, #phpBites A simple connection to mysql database, and selecting from a table. $connection = new \PDO(‘mysql:host=’.$yourDbHost.’;dbname=’.$yourDbName, $yourDbUserName, $yourDbPassword); $query = “SELECT col1, col2, col3, col4 FROM table WHERE col1 = :col1Value”; $stmt = $connection->prepare($query); $stmt->execute([…