Php Remove Empty Value In Array Js Functions Explained In Python