Php Convert Multidimensional Array Powershell If Statement