Im using codeigniter, Yes i have searched internet and i have in_array() but it seems that it is not working.
See here is the array i am getting from database.
Array ( [0] => stdClass Object ( [FormCIPath] => admin/dashboard/System ) [1] => stdClass Object ( [FormCIPath] => admin/dashboard/Users ) [2] => stdClass Object ( [FormCIPath] => admin/residentials/# ) [3] => stdClass Object ( [FormCIPath] => admin/configurations/# ) [4] => stdClass Object ( [FormCIPath] => admin/configurations/ManageForms ) [5] => stdClass Object ( [FormCIPath] => admin/residentials/Houses ) [6] => stdClass Object ( [FormCIPath] => admin/residentials/Flats ) [7] => stdClass Object ( [FormCIPath] => admin/configurations/ManageTabs ) [8] => stdClass Object ( [FormCIPath] => admin/configurations/SitePreferences ) [9] => stdClass Object ( [FormCIPath] => admin/usersManageUsers/# ) [10] => stdClass Object ( [FormCIPath] => admin/usersManageUsers/CreateUser ) [11] => stdClass Object ( [FormCIPath] => admin/usersManageUsers/ListUsers ) )
i want to find if configurations/ManageForms is present inside the array, so i tried like this.
$partialURI = $class."/".$method;
if(in_array($partialURI,$result)){
return "True";
}
else{
return "FALSE";
}
but i always get False in return. i haved checked the variable $partialURI it is returning configurations/ManageForms.
But still i am getting FALSE in return and where as you can see this text is present inside array above??
in_array()didn't worked for me.