3xtr3m3d
asked on
php array help
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Assuming, section is an array, here is the piece of code which returns trur if logged in user section number is present in the section.
sessionSectionVar - is the section number of user stored in the session.
<?php
function myfunction($ae)
{
if ($ae===sessionSectionVar)
{
return true;
}
return false;
}
print_r(array_filter($ae," myfunction "));
?>
sessionSectionVar - is the section number of user stored in the session.
<?php
function myfunction($ae)
{
if ($ae===sessionSectionVar)
{
return true;
}
return false;
}
print_r(array_filter($ae,"
?>
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
yeah currently i have 15 offices and also that can be increased in future
15 offices or 200 or 20,000 offices will not really matter. If your tables are indexed correctly the size and speed of the app will be just fine. Anyway thanks for the points and good luck with it, ~Ray
http://lmgtfy.com/?q=Should+I+Normalize+My+Database
;-)
HTH, ~Ray