With the initial parameter:


SUBMITTED BY: henry1874w

DATE: June 25, 2017, 2:39 p.m.

FORMAT: Text only

SIZE: 145 Bytes

HITS: 281

  1. <?php
  2. function myfunction($v1,$v2)
  3. {
  4. return $v1 . "-" . $v2;
  5. }
  6. $a=array("Dog","Cat","Horse");
  7. print_r(array_reduce($a,"myfunction",5));
  8. ?>

comments powered by Disqus