fork(2) download
  1. <?php
  2.  
  3. $countries = array(
  4. array('1','USA'),
  5. array('93','Afghanistan'),
  6. array('358','Finland'),
  7. array('3','India')
  8. );
  9. $input_code = '358545454554';
  10. $searched = array();
  11. foreach($countries as $country) {
  12. if (strpos($input_code, $country[0]) !== FALSE)
  13. $searched[] = $country[1];
  14. }
  15. print_r($searched);
  16.  
  17. ?>
Success #stdin #stdout 0.01s 20568KB
stdin
Standard input is empty
stdout
Array
(
    [0] => Finland
    [1] => India
)