Probable your foreach() construct is wrapped in a function call:
You'll need to make the $pagesArray available locally:
But this is really basic knowledge
PHP Code:
your_function() {
foreach($pagesArray as $key => $value) {
...
}
You'll need to make the $pagesArray available locally:
PHP Code:
your_function() {
global $pagesArray;
foreach($pagesArray as $key => $value) {
...
}
But this is really basic knowledge