13 Dec
function in_multiarray($needles, $haystack)
{
foreach ($needles as $needle) {
// Displays var name & value currently searching for)
//echo ‘$needle: ‘.$needle;
foreach ($haystack as $haystack_sub) {
if (@in_array($needle, $haystack_sub) ) {
return true;
}
else {
return false;
}
}
}
For example if you have an array
$mainArr[‘approval’][‘medication’] = Array (
)
And you want to search for 125
in_multiarray(125,$mainArr[‘approval’][‘medication’]);
I am a software engineer who specializes in Internet applications. I have worked with a wide variety of technologies and programming languages to open source LAMP environments. I have more than 6 years of object-oriented programming experience and am highly proficient in ActionScript, PHP, MYSQL, JavaScript, Jquery and a multitude of other technologies used in modern web applications.
Follow me
Latest posts by Rajeev Achra (see all)
- Jquery webcam plugin - June 19, 2016
- How To Add and Delete Users on a CentOSServer - June 5, 2016
- How To Set Up vsftpd on CentOS 6 - June 5, 2016