darkfreaks Posted April 28, 2009 Share Posted April 28, 2009 i was wondering how i would turn abunch if if arguements into an error switch case if someone could give me an example ??? Link to comment https://forums.phpfreaks.com/topic/155990-solved-turnings-if-statements-to-switch/ Share on other sites More sharing options...
mrMarcus Posted April 28, 2009 Share Posted April 28, 2009 switch ($_GET['error']) { case name: echo "Please enter a name."; break; case age: echo "Please enter your age."; break; } there's an example where $_GET is a parameter sent in the URL from a pre-existing form submission which contains some errors. Link to comment https://forums.phpfreaks.com/topic/155990-solved-turnings-if-statements-to-switch/#findComment-821142 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.