Skip to content

Instantly share code, notes, and snippets.

View ryanorsinger's full-sized avatar
🎏
Reading the readme... again :)

Ryan Orsinger ryanorsinger

🎏
Reading the readme... again :)
View GitHub Profile
@bbatsche
bbatsche / snippet.php
Last active August 29, 2015 13:56
Snippet on how to reset the array keys
<?php
// ...
} elseif ($input == 'R') {
// Remove which item?
echo 'Enter item number to remove: ';
// Get array key
$key = trim(fgets(STDIN));
while ($key < count($items)) {
$items[$key - 1] = $items[$key];