codepad
[
create a new paste
]
login
|
about
Language:
C
C++
D
Haskell
Lua
OCaml
PHP
Perl
Plain Text
Python
Ruby
Scheme
Tcl
<?php $results = array ( array('page'=>'duet/faq/horse', 'col0'=> 001 , 'col1' => NULL, 'col2' => NULL) , array('page'=>'duet/faq/' , 'col0'=> 'uno', 'col1' => 'dos', 'col2' => NULL) , array('page'=>'duet/' , 'col0'=> 'one', 'col1' => 'two', 'col2' => 'three') ); print_r($results); foreach(array_keys($results[0]) as $key) foreach($results as $result) if ($result[$key]){ $final[$key] = $result[$key]; continue 2; } print_r($final); ?>
Private
[
?
]
Run code
Submit