Bullet Posted August 20, 2008 Share Posted August 20, 2008 }elseif ($users->mobile != 0){ if ($users->house == "None"){ $rand="1"; }elseif ($users->house == "Caravan"){ $rand="30"; }elseif ($users->house == "Semi-Detached"){ $rand="40"; }elseif ($users->house == "Cottage"){ $rand="50"; }elseif ($users->house == "Mansion"){ $rand="60"; } $luck = rand(1,$rand); if($luck == 1){ I'm trying to get the rand depending on the house, but for some reason the it's only selecting from the bottom where the rand is 60 even though the user;s mansion is None. Help please. Link to comment https://forums.phpfreaks.com/topic/120612-solved-only-getting-last-rand/ Share on other sites More sharing options...
Bullet Posted August 20, 2008 Author Share Posted August 20, 2008 I got it . Link to comment https://forums.phpfreaks.com/topic/120612-solved-only-getting-last-rand/#findComment-621509 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.