Hi guys I have no idea if this is possible or if there is another way of doing it but any help would be appreciated. What I\'m trying to do is turn off arrays individually.
What you are suggesting is not possible. You would need to add the variables base on the if/else conditional after you have made the array.
For example:
$arrLayout = array();
if($LibraryStatus) {
$arrLayout['section1'] = array("wLibrary" => array(
"title" => "XBMC Library",
"display" => ""
));
}
This still rather untidy because of your array structure, I'd try eliminating some keys if you can, for example do you need section1? You could just let PHP add a numerical key by doing $arrLayout[] = array(..), which create a new 'row' in the array which you can still loop through.