Php Remove Last Element Of Array Javascript Length Method In Javascript