ã¨ããããä¸ã¤ã ãã©ã³ãã ã§æãåºãå ´å 1~100ã¾ã§ã®æ°åããä¸ã¤ã ãæãåºãã $num= mt_rand(1,100); 1ãã10ã¾ã§ã®æ°åããã©ã³ãã ã«æãåºã for ($i = 0 ; $i < 5 ; $i++){ $num = mt_rand(1, 6); print $num."/"; } 5åã«ã¼ããã¦ã¿ã¾ãããã ããã¨ã åãæ°åãéè¤ãã¦ãã¾ãã¾ããã ä»åã¯ãããé¿ããæ¹æ³ã§ãã ã¾ãã¯æ°åã®é åãä½ã $ar_num = range(1,10); ããã§1~10ã¾ã§ã®é åãå®æãã¾ããã æ°åãå ¥ã£ãé åãã·ã£ããã«ãã shuffle($ar_num); ããã§æ ¼ç´ãããè¦ç´ ã®é çªããã©ãã©ã«ãªã£ãé åã«ãªãã¾ããã ã·ã£ããã«ããé åã表示 for ($i = 0 ; $i < 5 ; $i++){ print $ar_num[$i]."/"; } 5
{{#tags}}- {{label}}
{{/tags}}