phrozenflame Posted December 29, 2006 Share Posted December 29, 2006 I backtracked and found somethign I didn't understand, I have tried fighting with these for awhile, the switch case statements, I am not sure how or when to supplement these, I wrote my own script, basic script to test, and mastered if statements(atleast the basics).if <?php$grade = 70;$mark = 97;$david = 53;$jim = 63;$walton = 96;$jessy = 63;$dave = 93;$parker = 63;if ($mark ?>well whatever you get the picture I can't retype all that right now, but I created it to where if you compare someones grade, with teh grade value, for instance, if there grade is above 70 or equal to, it says you passed, sort of, or if it didn't they failed. So I set all that up, and when I tried to run it to a switch case statement, THere's no way possible switch statements, are not meant to be used like that, so how are they used Link to comment https://forums.phpfreaks.com/topic/32150-how-does-a-switch-statement-work/ Share on other sites More sharing options...
trq Posted December 29, 2006 Share Posted December 29, 2006 There are examples in the [url=http://php.net/switch]manual[/url], which parts don't you understand exactly?PS: A more descriptive thread title would also be appreciated in future. Link to comment https://forums.phpfreaks.com/topic/32150-how-does-a-switch-statement-work/#findComment-149203 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.