Help with functions / PDO statements

Why not create a function which creates the PDO object, then pass that PDO object to all the rest of your functions (or have those functions call the PDO function)?

This keeps the connection information in one place. Something like this:

function getCities($state) {
     $pdo = getPDOObject();
     $sql= "SELECT DISTINCT city FROM ZipCodes WHERE state = '$state' ORDER BY city";
     $stmt = $pdo->prepare($sql);
     $stmt->execute();
     $result = $stmt->fetchAll();
     return $result;
}

function getPDOObject() {
    $dsn = 'mysql:host=localhost;dbname=**DBNAME**';
    $user = '**MY_DB_USER**';
    $pass = '**MY_DB_PW**';
    return new PDO($dsn, $user, $pass);
}