Search Header Logo

php-3

Authored by 邱建誌 邱建誌

Computers

11th Grade

Used 6+ times

php-3
AI

AI Actions

Add similar questions

Adjust reading levels

Convert to real-world scenario

Translate activity

More...

    Content View

    Student View

10 questions

Show all answers

1.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

若$a="5",則下列正確的有哪些?

(a)echo $a; 會出現5

(b)echo "$a";  會出現5

(c)echo '$a';  會出現$a

(d)echo "$a+5"; 會出現10

(e)echo "$a+5"; 會出現5+5

abcde

abcd

abce

abc

2.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

陣列顯示內容,何者正確?

(A) echo $a[0];

(B) echo "$a[0]";

(C) echo '$a[0]';

ABC

AB

AC

3.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

若存在 $money["zen"], 何者正確?

(A) echo "$money["zen"]";

(B) echo "$money[zen]";

(C) echo $money["zen"];

(D) echo $money[zen];

ABCD

ABC

AC

C

4.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

若有表單,按了送出,會生成?

<form method=post>

訊息:<input type=text name=msg><br>

<input type=submit name=go value="送出">

</form>

$_POST["msg"]

$_POST["go"]

$POST["msg"]

$POST["go"]

$_POST[msg]

$_POST[go]

$POST[msg]

$POST[go]

5.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

若在下拉式選單ban中選擇了602,在按送出之後,產生了?

$_POST["ban"]="602"

$_POST[ban]=602

$ban="602"

6.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

若只勾選法國,

<input type=checkbox name=go[] value="日本">日本

<input type=checkbox name=go[] value="美國">美國

<input type=checkbox name=go[] value="法國">法國

則下列何者出現法國字樣?

echo $_POST["go"][3];

echo $_POST["go"][2];

echo $_POST["go"][1];

echo $_POST["go"][0];

7.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

為了讓不固定數量的陣列可以全部顯示出來(歷遍陣列所有項目),

程式碼要?

$i=0;

while(   isset($_POST["go"][$i])    )

   { 

   echo $_POST["go"][$i]; 

   $i++; 

   }

$i=0;

while(   isset($_POST["go"][$i])    )

   { 

   echo $_POST["go"][$i]; 

   }

Access all questions and much more by creating a free account

Create resources

Host any resource

Get auto-graded reports

Google

Continue with Google

Email

Continue with Email

Microsoft

Continue with Microsoft

or continue with

Facebook

Facebook

Apple

Apple

Others

Others

Already have an account?