質問編集履歴
1
書式の改善
test
CHANGED
File without changes
|
test
CHANGED
@@ -24,21 +24,49 @@
|
|
24
24
|
|
25
25
|
### 該当のソースコード
|
26
26
|
|
27
|
+
<?php
|
28
|
+
|
27
29
|
$usrs =array(
|
28
30
|
|
29
31
|
|
30
32
|
|
31
|
-
array("name"=>"山田","gendar"=>"男","
|
33
|
+
array("name"=>"山田","gendar"=>"男","math"=>78,"国語"=>47,"英語"=>92),
|
32
34
|
|
33
|
-
array("name"=>"田中","gendar"=>"女","
|
35
|
+
array("name"=>"田中","gendar"=>"女","math"=>12,"国語"=>88,"英語"=>67),
|
34
36
|
|
35
|
-
array("name"=>"高橋","gendar"=>"男","
|
37
|
+
array("name"=>"高橋","gendar"=>"男","math"=>56,"国語"=>34,"英語"=>77),
|
36
38
|
|
37
|
-
array("name"=>"橋本","gendar"=>"女","
|
39
|
+
array("name"=>"橋本","gendar"=>"女","math"=>97,"国語"=>55,"英語"=>45)
|
38
40
|
|
39
41
|
|
40
42
|
|
41
43
|
);
|
44
|
+
|
45
|
+
$math = $usrs["math"];
|
46
|
+
|
47
|
+
$max = $math[0];
|
48
|
+
|
49
|
+
|
50
|
+
|
51
|
+
for($i=1;$i<count($usrs("math"));$i++){
|
52
|
+
|
53
|
+
if($max<$math[$i]){
|
54
|
+
|
55
|
+
$max=$math[$i];
|
56
|
+
|
57
|
+
}
|
58
|
+
|
59
|
+
}
|
60
|
+
|
61
|
+
|
62
|
+
|
63
|
+
echo $max;
|
64
|
+
|
65
|
+
|
66
|
+
|
67
|
+
|
68
|
+
|
69
|
+
?>
|
42
70
|
|
43
71
|
```ここに言語名を入力
|
44
72
|
|
@@ -50,9 +78,13 @@
|
|
50
78
|
|
51
79
|
### 試したこと
|
52
80
|
|
53
|
-
|
81
|
+
数学の最高点を出したくてコードを書きました。
|
54
82
|
|
83
|
+
関数を使わずに出力したいです。
|
84
|
+
|
55
|
-
|
85
|
+
for文if文を使用して出力することは可能ですか?
|
86
|
+
|
87
|
+
|
56
88
|
|
57
89
|
|
58
90
|
|