Location: PHPKode > projects > phpMyPrepaid > phpmyprepaid/www/include/account/genCVS.php
<?php
//////////////////////////////////////////////////////////////////////////
//  Create CSV doc for export into something else			//
//////////////////////////////////////////////////////////////////////////
if (!isset($oreon))
                exit();
$filename = "tmp/cards.csv";  // FIRST WE OPEN, ERASE AND CLOSE
$fp = fopen($filename, "w+") or die("Couldn't create new file");

foreach($UserPass as $id => $pass ) {
	$somecontent ="$id, $pass \n";
	if (fwrite($fp, $somecontent) === FALSE) {
		echo "Cannot write to file ($filename)";
		exit;
	}
	//	echo "Success, wrote ($somecontent) to file ($filename)";
  }
fclose($fp);

?>
Return current item: phpMyPrepaid