<?php 


//Production DB
$servername = "localhost";
$username = "db_admin";
$password = "iIkqeMWw&.-8";
$dbname = "payroll";

//Dev DB
// $servername = "localhost";
// $username = "cltinspection_payrolldev";
// $password = "NeW&kL-*ay+]";
// $dbname = "cltinspection_payrolldev";


$zipArr = array();
$con = mysqli_connect($servername, $username, $password, $dbname);

if (!$con) {
    echo "Error : Unable to open database";
}else{
    $zip_states_arr = array();
    $myQuery = "SELECT * FROM cltpr_zip_state_tbl";
    $zip_state_sql = mysqli_query($con, $myQuery);

    while ($zip_state_result = mysqli_fetch_assoc($zip_state_sql)) {
        $zipArr[$zip_state_result['zip_code']] = $zip_state_result['state'];
        //$zip_states_arr["'".$zip_state_result'zip_code'."'"] = "'".trim($zip_state_result'state')."',";
    }

    echo "<pre>"; print_r($zipArr); echo "</pre>";
    die;
}



?>