title: multidimensional array tell if a use a value based on flag
body: <pre><code>Array ( 
  [0] =&gt; Array ( [address] =&gt; New York [address_flag] =&gt; 0 ) 
  [1] =&gt; Array ( [address] =&gt; London [address_flag] =&gt; 1)
  </code></pre>
  
  <p>Lets say i have this array above, <code>address 1</code> will always be there while <code>address 2</code> can be null how can i get the value of <code>address 2</code> if it is available;how can i tell that <code>address 2</code> is null or not?</p>
  
  <p>I am getting their value like this</p>
  
  <pre><code>foreach (address() as $value) {
  
  echo $value['address']
  
  }
  </code></pre>
  
  <p><code>UPDATE</code></p>
  
  <p>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</p>