1) How a variable is declared in PHP? a) ?variableName=value; b) $variableName=value; c) =variableName=value; d) variableName=value; 2) What is the code to output "Hello World"? a) cout>>Hello World>/ b) cin>>Hello World>/ c) Hello World d) echo "Hello World"; 3) What is the correct opening tag and close tag for PHP scripts? a) opening tag = <?php / close tag = <? b) opening tag = <?php / close tag = ?> c) opening tag = include iostream / close tag = / d) opening tag = <? / close tag = ?> 4) What is the single-line comment in php? a) ** b) // c) */ d) *// 5) What is the multi-line comment in php? a) /* comment */ b) // comment // c) ** comment ** d) ?>php comment ?> 6) Create a variable named txt and assign the value "Hello" a) txt= "Hello"; b) <?php txt= "Hello"?> ; c) $txt= "Hello"; d) $Hello= "txt"; 7) Create an if else code when $a is greater than $b, it will print Hello. a) if ($a>$b) = cout Hello b) if ($a>$b) {echo "Hello World"; } c) if ($b>$a) {echo "Hello World"; } d) if ($a=$b) {echo "Hello World"; } 8) Call (execute) a function named myFunction a) int myFunction b) include int myFunction c) call myFunction; d) myFunction() 9) Here you see an associative array. Output "age" of Ben. $age = array("Peter"=>"35", "Ben"=>"37","Joe"=>"43"); a) echo "Ben is " .$age['Ben']. " years old."; b) echo "Ben is " .$age['37']. " years old."; c) echo "Ben is " .$array['37']. " years old."; d) echo "Ben is " .$age['Peter']. " years old."; 10) Create a session variable named "favcolor". a) session_start(); $_SESSION["green"] = "favcolor"; b) session_start(); $_SESSION["favcolor"] = "green"; c) session_stop(); $_SESSION["favcolor"] = "green"; d) session_stop(); $_SESSION["green"] = "favcolor";
0%
PHP
共有
共有
共有
Intannazira2110
さんの投稿です
コンテンツの編集
印刷
埋め込み
もっと見る
割り当て
リーダーボード
もっと表示する
表示を少なくする
このリーダーボードは現在非公開です。公開するには
共有
をクリックしてください。
このリーダーボードは、リソースの所有者によって無効にされています。
このリーダーボードは、あなたのオプションがリソースオーナーと異なるため、無効になっています。
オプションを元に戻す
ゲームショウ・クイズ
は自由形式のテンプレートです。リーダーボード用のスコアは生成されません。
ログインが必要です
表示スタイル
フォント
サブスクリプションが必要です
オプション
テンプレートを切り替える
すべてを表示
アクティビティを再生すると、より多くのフォーマットが表示されます。
オープン結果
リンクをコピー
QRコード
削除
自動保存:
を復元しますか?