$products = $db->query("SELECT * FROM products ORDER BY price ASC");This will return an array of product objects ordered by their price from lowest to highest. Package Library: The order_by function is commonly used with PHP's database libraries such as PDO, mysqli, and Doctrine. It is also included in many PHP frameworks such as Laravel, Symfony, and CodeIgniter.