Answer:Rebase array keys after unsetting elements [php]

$array = array_values($array);

http://stackoverflow.com/a/5943165
ref: https://twitter.com/sornram9254/status/737696350146437120

Answer:Detecting request type in PHP (GET, POST, PUT or DELETE)

$_SERVER['REQUEST_METHOD']

http://stackoverflow.com/a/359050
ref: https://twitter.com/sornram9254/status/738063120422174720