Skip to content

Instantly share code, notes, and snippets.

View indrakaw's full-sized avatar
🎯
Focusing

Indra Kurniawan indrakaw

🎯
Focusing
  • Slow Code, co.
  • Cirebon, Indonesia
View GitHub Profile
@indrakaw
indrakaw / csv_to_array.php
Created February 16, 2016 11:53 — forked from jaywilliams/csv_to_array.php
Convert a comma separated file into an associated array.
<?php
/**
* Convert a comma separated file into an associated array.
* The first row should contain the array keys.
*
* Example:
*
* @param string $filename Path to the CSV file
* @param string $delimiter The separator used in the file
* @return array