The case:
If a word occurs in the URL, then you need to display some text. For example, if the URL contains “hahaha”, then on the page you need to display the text “description of the text hahaha”.
PHP solution:
<?php if(strpos($_SERVER['REQUEST_URI'], 'hahaha') !== false){ echo "description of the text hahaha"; } ?>
Instead of hahaha write your part of the URL, and instead of description of the text hahaha write your text.
The 2nd version (in general, everything is the same, with an additional else if):
<?php if(strpos($_SERVER['REQUEST_URI'], 'hahaha') !== false):?> description of the text hahaha <?php elseif(strpos($_SERVER['REQUEST_URI'], 'meow') !== false):?> description of the text meow <?php else: ?> not hahaha and not meow <?php endif; ?>