fork(2) download
  1. <?php
  2.  
  3. $a = array(
  4. 'mark@test.com'=> "Mark Mian",
  5. 'jhon@test.com'=> "John jack",
  6. 'logon@test.com'=> "Bob Logon",
  7. 'Stela@test.com'=> "Stela Josh",
  8. 'json@test.com'=> "Json Josh",
  9. 'bobby@test.com'=> "Bob Mark"
  10. );
  11. $r = preg_grep('~Mark~i', $a);
  12. print_r($r);
Success #stdin #stdout 0.02s 52472KB
stdin
Standard input is empty
stdout
Array
(
    [mark@test.com] => Mark Mian
    [bobby@test.com] => Bob Mark
)