JOWP Posted August 20, 2009 Share Posted August 20, 2009 Hi, first cheers to all.. i have a question: How to make this example: example.com/index.php?c=1&d=ok Thanks Link to comment https://forums.phpfreaks.com/topic/171123-make-this-examplecomindexphpc1dok/ Share on other sites More sharing options...
Garethp Posted August 20, 2009 Share Posted August 20, 2009 What do you want it to do? Link to comment https://forums.phpfreaks.com/topic/171123-make-this-examplecomindexphpc1dok/#findComment-902410 Share on other sites More sharing options...
JOWP Posted August 20, 2009 Author Share Posted August 20, 2009 hi, thanks for reply i am interesed make module and submodule for example: example.com/index.php?animals=horses&year=2 how to make this in php thanks Link to comment https://forums.phpfreaks.com/topic/171123-make-this-examplecomindexphpc1dok/#findComment-902416 Share on other sites More sharing options...
Garethp Posted August 20, 2009 Share Posted August 20, 2009 Hm... I think I might know what you mean. Look here http://www.w3schools.com/PHP/php_get.asp http://www.w3schools.com/PHP/php_switch.asp http://www.w3schools.com/PHP/php_if_else.asp Link to comment https://forums.phpfreaks.com/topic/171123-make-this-examplecomindexphpc1dok/#findComment-902421 Share on other sites More sharing options...
JOWP Posted August 24, 2009 Author Share Posted August 24, 2009 Hi, thanks for reply and sorry for my delay, well i am make this <?php $cat = $_GET['cat']; $sub = $_GET['sub']; switch ($cat){ case horse: (code to execute) switch ($sub) { case color: (code to execute) break; default: } break; case dog: (code to execute) break; default: } ?> this code have a good perfomance? thanks Link to comment https://forums.phpfreaks.com/topic/171123-make-this-examplecomindexphpc1dok/#findComment-905390 Share on other sites More sharing options...
JOWP Posted August 28, 2009 Author Share Posted August 28, 2009 any reply? is for good performance? not satured the server? with the function switch thanks Link to comment https://forums.phpfreaks.com/topic/171123-make-this-examplecomindexphpc1dok/#findComment-907994 Share on other sites More sharing options...
waynew Posted August 28, 2009 Share Posted August 28, 2009 I'm very sorry but the theory behind your question seems very vague. But your switch statement seems ok. Provided that you don't try to use pseudocode Link to comment https://forums.phpfreaks.com/topic/171123-make-this-examplecomindexphpc1dok/#findComment-907999 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.