How can I display a list of pages and the template used by each?

You could try this quick piece of code, it doesnt output to array though.

    $args = array( 'meta_key' => '_wp_page_template', 'sort_column' => 'post_title', 'sort_order' => 'desc');
    $templates = get_pages($args);
    foreach ( $templates as $template){
        $templatePage  = $template->meta_value;
        $templateName  = $template->post_name;

    echo "Named Template: {$templateName} - - {$templatePage}\n";
    }

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)