LPH
Well-known member
My education continues ....
I built a checkbox option within a settings page. The option "0" and "1" work because I can put the following to see the changes when the form is saved via a submit button. (Yeah!).
Works great and returns
The zero will change to a 1 when the box is checked.
Now, looking at the array, I want to build an if statement wrapped around a echo "This is showing when unchecked...."
Now, I'm still struggling with an array and a key. I've tried different options in the ?????? location. Does someone (1) have any idea immediately how to fix this so the conditional works .. (2) more importantly, is there a good reference or tutorial on arrays?
Ever so appreciated.
I built a checkbox option within a settings page. The option "0" and "1" work because I can put the following to see the changes when the form is saved via a submit button. (Yeah!).
PHP:
echo $this->0Debug->getArray( $this->oProps->arrOptions );
Works great and returns
Code:
Array {
[xf_branding] => Array {
[branding] => Array {
[checkbox] => 0
}
}
}
The zero will change to a 1 when the box is checked.
Now, looking at the array, I want to build an if statement wrapped around a echo "This is showing when unchecked...."
PHP:
function footer() {
if ( ????????? == '0' ) {
echo "This is showing when unchecked";
}
}
Now, I'm still struggling with an array and a key. I've tried different options in the ?????? location. Does someone (1) have any idea immediately how to fix this so the conditional works .. (2) more importantly, is there a good reference or tutorial on arrays?
Ever so appreciated.