Php Check Array Size Javascript Function How To Use