I have an array which looks like the following
array:2 [▼
0 => array:1 [▼
"input1" => "Something"
]
1 => array:1 [▼
"input2" => ""
]
]
Now the first element will always have some data. It is the second element I am interested in. At the moment, I am trying this
if(!empty($clientGroup[0][1]) || !empty($clientGroup[1][1]))
var_dump("Some Data");
} else {
var_dump("Both Empty");
}
The else should only be triggered if both elements are empty e.g.
array:2 [▼
0 => array:1 [▼
"input1" => ""
]
1 => array:1 [▼
"input2" => ""
]
]
If one of them have any data, the if should be triggered (so for the first array I showed, the if should be triggered).
How would I go about doing this, empty does not seem to work.
Thanks