Array (
[0] => Array ( [address] => New York [address_flag] => 0 )
[1] => Array ( [address] => London [address_flag] => 1)
Lets say i have this array above, address 1
will always be there while address 2
can be null how can i get the value of address 2
if it is available;how can i tell that address 2
is null or not?
I am getting their value like this
foreach (address() as $value) {
echo $value['address']
}
UPDATE
I want to use the address with flag 0 only if address with flag 1 is not available..how do go about this?any idea is appreciated