PHP

Filter

<?php
   function endswithy($value) {
      return (substr($value, -1) == 'y');
   }

   $people = array("Johnny", "Timmy", "Bobby", "Sam", "Tammy", "Danny", "Joe");
   $withy = array_filter($people, "endswithy");
   var_dump($withy);
?>

José M. Vidal .

17 of 33