Skip to content
Advertisement

Fetching url query parameters inside php case

I have below index.php file which will handle all routes: And below file is home.php: In case of no query strings, the above setup works fine. But how will I include the condition in which user hits 127.0.0.1/home?1234. In this case, any case statement will become invalid and it will return wrong. How would I change this so that it

Can I use a function such as strtolower() in the echo statement in PHP?

I’m trying to convert the variable name to all lower case, in an echo statement. For example: I want to convert the variable name to all lowercase, so I can get the picture. I tried just changing the name of the image to Holiday.jpg but I wanted to know if this is possible… Thank you in advance! Answer

Advertisement