Toggle navigation
Home
Latest pastes
FAQ
Random
Register
Login
Send the values in an array to a user-defined function and return a string:
SUBMITTED BY:
henry1874w
DATE:
June 25, 2017, 2:38 p.m.
FORMAT:
Text only
SIZE:
143 Bytes
Raw
Download
Tweet
HITS:
213
Go to comments
Report
<?php
function myfunction($v1,$v2)
{
return $v1 . "-" . $v2;
}
$a=array("Dog","Cat","Horse");
print_r(array_reduce($a,"myfunction"));
?>
Please enable JavaScript to view the
comments powered by Disqus.
comments powered by
Disqus