I have a website with multiple categories and I have created one social links php page for each category. I have created a php function to obtain php file based on last-word of URL. I want the function to occur If only last-word matches the names of Categories. ex:cat1, cat2, cat3 etc...
I would like to know whether there is a chance to compare a variable with multiple strings and output as boolean If the variable value matches any of the string value.
Also please send the code to occur function, When the boolean value is true only.
Your help and patience are much appreciated. Thanks in Advance.
URl: domain.com/cat1
Last_word is cat1
last_words we need to have are cat1,cat2,cat3,cat4.. Include php file cat1-sociallinks.php
If last_word is cat2 then, Include php file cat1-sociallinks.php
If last_word is something other than the cat#, then dont include php sociallinks.php file.