I have this chunk of PHP code which is giving me the error:
Warning: Illegal string offset 'mod_modulecode' in C:\xampp\htdocs\MP\multi\functions.php on line 29
This is the code that the warning is relating to:
function set_rights($menus, $menuRights) {
$data = array();
for ($i = 0, $c = count($menus); $i < $c; $i++) {
$row = array();
for ($j = 0, $c2 = count($menuRights); $j < $c2; $j++) {
if ($menuRights[$j]["rr_modulecode"] == $menus[$i]["mod_modulecode"]) {
if (authorize($menuRights[$j]["rr_create"]) || authorize($menuRights[$j]["rr_edit"]) ||
authorize($menuRights[$j]["rr_delete"]) || authorize($menuRights[$j]["rr_view"])
) {...................'
Any help would be greatly appreciated.