Don't like ads? PRO users don't see any ads ;-)
Guest

Untitled

By: a guest on May 5th, 2012  |  syntax: None  |  size: 0.40 KB  |  hits: 15  |  expires: Never
download  |  raw  |  embed  |  report abuse  |  print
Text below is selected. Please press Ctrl+C to copy to your clipboard. (⌘+C on Mac)
  1. Accessing elements in array
  2. Array (
  3.     [0] => Array (
  4.         [0] => Array (
  5.             [sum(`Lgsl`.`players`)] => 7769
  6.         )
  7.     )
  8. )
  9.        
  10. list ($number) = array_values($arr[0][0]);
  11.        
  12. $var = $a[0][0][array_search(7769, $a[0][0])]; // to do it perfect, you can add isset() check.
  13.        
  14. $a = array(0 => array(0 => array('some' => 7769)));
  15.  
  16. $var = $a[0][0][array_search(7769, $a[0][0])];
  17.  
  18. echo $var;