I'm currently working on a website and I need to generate a sitemap XML file dynamically using PHP. I want to ensure that all my website pages are properly indexed by search engines.
I was wondering if anyone could provide me with a code snippet or recommend a library that would help me achieve this task efficiently. It would be great if the solution is easy to integrate into my existing PHP codebase.
Thanks in advance for your help!