I have a page where I need to detect a CSS class and then apply if/else statement using PHP. How do I do that?
HTML
<body>
<div class="insights">
Hello World
</div>
</body>
What would be the PHP code to detect and find "insights" class exists and show "yes, it exists". If there's no class of that name then show "No, it doesn't exists."
How should I achieve this?