Php Remove Last Element Of Array In Javascript