How can I achieve a URL like this: mydomain.com/index.php?content=content1&item=content2&topic=content3 Can I do this if I am using switch? If not, what is the best way to achieve this? Thanks.
You should give more details on content, item and topic. What are they? Is one of them an item ID to show?
Your question is very vague, do you mean how can you get the data from the url, or how to create the url?
If you are talking about getting the values of content, content & content3, then is as easy as: $content = $_GET['content']; $content2 = $_GET['content2']; $content3 = $_GET['content3']; $content would then = 'content1' $content2 would then = 'content2' $content3 would then = 'content3'
Yes you can use switch. Under the switch you have the first content1, then below you have content2. The way the URL is set up it's reading the switch like index.php?content, then under that it's building on top of the base part of the URL.