pdo_drivers

(PHP 5)

pdo_drivers --  Return an array of available PDO drivers

Description

array pdo_drivers ( void )

Warning

This function is EXPERIMENTAL. The behaviour of this function, the name of this function, and anything else documented about this function may change without notice in a future release of PHP. Use this function at your own risk.

This function returns all currently available PDO drivers which can be used in DSN parameter of PDO::__construct().

Return Values

pdo_drivers() returns an array of PDO driver names. If no drivers are available, it returns an empty array.

Examples

Example 1. A pdo_drivers() example

<?php
print_r
(pdo_drivers());
?>

The above example will output something similar to:

Array
(
    [0] => mysql
    [1] => sqlite
)

Hosting by: Hurra Communications Ltd.
Generated: 2007-01-26 18:00:10