PHPize Online / SQLize Online  /  SQLtest Online

A A A
Share      Blog   Popular
Copy Format Clear
Copy Clear
Copy Format Clear
<?php $login = 123; $config = array( 'shop1' => array( 'login' => 123, 'password' => 123 ), 'shop2' => array( 'login' => 456, 'password' => 456 ), 'shop3' => array( 'login' => 789, 'password' => 789 ) ); $res = array_filter( $config, function($el) use($login) { return $el['login'] == $login; } ); var_export($res);
Show:  
Copy Clear