No need to use count. An empty array evaluates to false (I had tested and worked for me, but just in case I searched and found it's how PHP works)
I'll use if($pagesArray) then. Thank you for your comments!
I'll use if($pagesArray) then. Thank you for your comments!