Php Set Variable To Empty Array In Useeffect