Php Add To Array If Condition In Python Syntax If Then Else