|
![](/images/resource/spacer.gif) |
|
สอบถามเกี่ยวกับการจับคู่คำถามกับคำตอบที่ถูกต้อง แบบรูปภาพตัวอย่างค่ะ |
|
![](/images/resource/viewboard_01.gif?v=1001) |
|
|
![](/images/resource/viewboard_03.gif?v=1001) |
![](/images/resource/viewboard_04.gif?v=1001) |
|
น่าจะประมาณนี้
flow
$question = array('a' => 'มีความใฝ่รู้','b'=>'มีความสามารถด้านการเป็นผู้นำ',...);//อาเรย์คำถาม
$user_ans = array(a,b,c,d,e);//อาเรย์ที่ตอบ
$score = 0;// คะแนน 0
for($i=0; $i<5; $i++){ //วน 5 ข้อ
if($result[$i]['answer3'] === $question[$user_ans[$i]]){ //ตรวจคำตอบว่าตรงกับดาต้าเบสไหม
$score +=1;//เพิ่ม 1 คะแนน
}
}
echo 'คุณตอบถูก ' . $score . ' ข้อ';
|
![](/images/resource/blockviewtopic_01.gif?v=1001) |
![](/images/resource/blockviewtopic_02.gif?v=1001) |
![](/images/resource/blockviewtopic_03.gif?v=1001) |
![](/images/resource/blockviewtopic_04.gif?v=1001) |
Date :
2016-01-09 13:52:19 |
By :
noMerzy |
|
![](/images/resource/blockviewtopic_06.gif?v=1001) |
![](/images/resource/blockviewtopic_07.gif?v=1001) |
![](/images/resource/blockviewtopic_08.gif?v=1001) |
![](/images/resource/blockviewtopic_09.gif?v=1001) |
|
|
![](/images/resource/viewboard_06.gif?v=1001) |
![](/images/resource/viewboard_07.gif?v=1001) |
|
![](/images/resource/viewboard_08.jpg?v=1001) |
![](/images/resource/viewboard_09.gif?v=1001) |
|
|
Load balance : Server 05
|