PHP in_array function is very helpful if you want to include or exclude php code of files based on a certain criteria like id’s or $_GET variables.
Let’s imagine that you have a list of numbers that we want to use to include a file.
If you want the get the page id or some parameter from the url using $_GET variable use the code snippet below and display content based on the id’s value.
(more…)