<?php $arr = array("arif", "arin", "asif", "armin", "arpan");$newar = preg_grep('|^ar|', $arr);print_r(array_keys($newar));
Standard input is empty
Array ( [0] => 0 [1] => 1 [2] => 3 [3] => 4 )
The brand new service which powers Ideone!
Widget for compiling and running the source code in a web browser!