Toggle navigation
Home
Latest pastes
FAQ
Random
Register
Login
Using two arrays:
SUBMITTED BY:
henry1874w
DATE:
June 23, 2017, 9:43 p.m.
FORMAT:
Text only
SIZE:
219 Bytes
Raw
Download
Tweet
HITS:
351
Go to comments
Report
<?php
function myfunction($v1,$v2)
{
if ($v1===$v2)
{
return "same";
}
return "different";
}
$a1=array("Horse","Dog","Cat");
$a2=array("Cow","Dog","Rat");
print_r(array_map("myfunction",$a1,$a2));
?>
Please enable JavaScript to view the
comments powered by Disqus.
comments powered by
Disqus