Skip to content

Instantly share code, notes, and snippets.

@jaesung2061
jaesung2061 / csv_to_array.php
Created January 6, 2019 06:51
CSV to array function
function csv_to_array($fileName, $delimiter) {
$parsed = [];
$line = 1;
$handle = fopen($fileName, 'r');
while (($data = fgetcsv($handle, 0, $delimiter)) !== false) {
$line++;
$row = [];
for ($i = 0; $i < count($data); $i++) {
alias ga="git add"
alias gaa="git add ."
alias gc="git commit -m"
alias gp="git push"
alias gs="git status"
alias gl="git log --graph --pretty=format:'%Cred%h%Creset -%C(yellow)%d%Creset %s %Cgreen(%cr) %C(bold blue)<%an>%Creset' --abbrev-commit"
alias gap="git add . && git commit -m 'work in progress' && git push"
alias gitignore="git rm -r --cached . && git add . && git commit -m '.gitignore is now working'"
alias cda="composer dump-autoload"
alias art="php artisan"