回答編集履歴

4

追記

2020/07/03 02:59

投稿

kyoya0819
kyoya0819

スコア10429

test CHANGED
@@ -50,7 +50,7 @@
50
50
 
51
51
  }
52
52
 
53
- $japanese .= (( $number == 1 ) ? '睦月' : (( $number == 2 ) ? '如月' : (( $number == 3 ) ? '弥生' : (( $number == 4 ) ? '卯月' : (( $number == 5 ) ? '皐月' : (( $number == 6 ) ? '月' : 'こんな数字知らね' )))))).$random;
53
+ $japanese .= (( $number == 1 ) ? '睦月' : (( $number == 2 ) ? '如月' : (( $number == 3 ) ? '弥生' : (( $number == 4 ) ? '卯月' : (( $number == 5 ) ? '皐月' : (( $number == 6 ) ? '水無月' : 'こんな数字知らね' )))))).$random;
54
54
 
55
55
  }
56
56
 

3

追記

2020/07/03 02:59

投稿

kyoya0819
kyoya0819

スコア10429

test CHANGED
@@ -6,13 +6,25 @@
6
6
 
7
7
  <?php
8
8
 
9
- $random = random_bytes(1024);
10
-
11
9
  $numbers = [
12
10
 
13
11
  1, 2, 3, 4, 5, 6
14
12
 
15
13
  ];
14
+
15
+
16
+
17
+ foreach($numbers as $number){
18
+
19
+ if(!isset($random)){
20
+
21
+ $random = '';
22
+
23
+ }
24
+
25
+ $random .= random_bytes(10000000000);
26
+
27
+ }
16
28
 
17
29
 
18
30
 

2

追記

2020/07/03 02:58

投稿

kyoya0819
kyoya0819

スコア10429

test CHANGED
@@ -5,6 +5,8 @@
5
5
  ```PHP
6
6
 
7
7
  <?php
8
+
9
+ $random = random_bytes(1024);
8
10
 
9
11
  $numbers = [
10
12
 
@@ -22,7 +24,7 @@
22
24
 
23
25
  }
24
26
 
25
- $monthes .= $number . "月hogehogehogehoge";
27
+ $monthes .= $number . "月" . $random;
26
28
 
27
29
  }
28
30
 
@@ -36,7 +38,7 @@
36
38
 
37
39
  }
38
40
 
39
- $japanese .= (( $number == 1 ) ? '睦月' : (( $number == 2 ) ? '如月' : (( $number == 3 ) ? '弥生' : (( $number == 4 ) ? '卯月' : (( $number == 5 ) ? '皐月' : (( $number == 6 ) ? '文月' : 'こんな数字知らね' )))))).'hogehogehogehoge';
41
+ $japanese .= (( $number == 1 ) ? '睦月' : (( $number == 2 ) ? '如月' : (( $number == 3 ) ? '弥生' : (( $number == 4 ) ? '卯月' : (( $number == 5 ) ? '皐月' : (( $number == 6 ) ? '文月' : 'こんな数字知らね' )))))).$random;
40
42
 
41
43
  }
42
44
 
@@ -46,11 +48,11 @@
46
48
 
47
49
  foreach($numbers as $number){
48
50
 
49
- echo '<tr>'
51
+ echo '<tr>';
50
52
 
51
- echo '<td>'.explode('hogehogehogehoge', $monthes)[$number-1].'</td>';
53
+ echo '<td>'.explode($random, $monthes)[$number-1].'</td>';
52
54
 
53
- echo '<td>'. explode('hogehogehogehoge', $japanese)[$number-1].'</td>';
55
+ echo '<td>'. explode($random, $japanese)[$number-1].'</td>';
54
56
 
55
57
  echo '</tr>';
56
58
 

1

追記

2020/07/03 02:49

投稿

kyoya0819
kyoya0819

スコア10429

test CHANGED
@@ -36,51 +36,7 @@
36
36
 
37
37
  }
38
38
 
39
- $japanese .= (( $number == 1 )
40
-
41
- ? '睦月'
42
-
43
- : (
44
-
45
- ( $number == 2 )
46
-
47
- ? '如月'
48
-
49
- : (
50
-
51
- ( $number == 3 )
52
-
53
- ? '弥生'
54
-
55
- : (
56
-
57
- ( $number == 4 )
58
-
59
- ? '卯月'
60
-
61
- : (
62
-
63
- ( $number == 5 )
64
-
65
- ? '皐月'
66
-
67
- : (
68
-
69
- ( $number == 6 )
70
-
71
- ? '文月'
72
-
73
- : 'こんな数字知らね'
74
-
75
- )
76
-
77
- )
78
-
79
- )
80
-
81
- )
82
-
83
- )).'hogehogehogehoge';
39
+ $japanese .= (( $number == 1 ) ? '睦月' : (( $number == 2 ) ? '如月' : (( $number == 3 ) ? '弥生' : (( $number == 4 ) ? '卯月' : (( $number == 5 ) ? '皐月' : (( $number == 6 ) ? '文月' : 'こんな数字知らね' )))))).'hogehogehogehoge';
84
40
 
85
41
  }
86
42