NEW
Font size
WorksheetsQuiz 2: Introduction to PHP
Total questions: 10
Worksheet time: 5mins
What does PHP stands for?
PHP: Hypertext Preprocessor
Private Home Page
Personal Hypertext Processor
Which among the following is the correct delimiters that surround PHP server scripts?
<?php>...</?>
<script>...</script>
<?php...?>
<&>...</&>
How do you write "Hello World" in PHP
Document.Write("Hello World");
"Hello World";
echo "Hello World";
1. All variables in PHP start with which symbol?
$
!
&
How do you get information from a form that is submitted using the "get" method?
Request.QueryString;
$_GET[];
Request.Form;
When using the POST method, variables are displayed in the URL:
True
False
How do you create an array in PHP?
$cars = "Volvo", "BMW", "Toyota";
$cars = array["Volvo", "BMW", "Toyota"];
$cars = array("Volvo", "BMW", "Toyota");
What is the correct way to add 1 to the $count variable?
$count =+1
$count++;
++count
count++;
The if statement is used to execute some code only if a specified condition is true
True
False
Which of the following is the correct code snippet for a foreach statement in PHP?
foreach ($variable as $key => $value)
foreach ($variable => $key as $value)
foreach ($ctr = 0; $ctr < $array_size; $ctr++)
foreach ($variable => $key => $value)
