Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Merge remote-tracking branch 'upstream/master'
  • Loading branch information
szk11001 committed Sep 2, 2015
2 parents 85e70c9 + e5b70a3 commit 9cc871d
Showing 1 changed file with 17 additions and 16 deletions.
33 changes: 17 additions & 16 deletions uc-people.php
Expand Up @@ -93,23 +93,24 @@ function save_name($my_post_name) {
endif;
return $my_post_name;
}

function processCSV($file){
$data = array();

$fh = fopen($file, 'r');
if( $fh == false ){
return;
}
$header = fgetcsv($fh);

while( $line = fgetcsv($fh) ) {
$data[] = array_combine($header, $line);
if(!function_exists('processCSV')){
function processCSV($file){
$data = array();

$fh = fopen($file, 'r');
if( $fh == false ){
return;
}
$header = fgetcsv($fh);

while( $line = fgetcsv($fh) ) {
$data[] = array_combine($header, $line);
}

fclose($fh);

return $data;
}

fclose($fh);

return $data;
}

function importFile( $filename ){
Expand Down

0 comments on commit 9cc871d

Please sign in to comment.