0% found this document useful (0 votes)
24 views

PHP Imp

Uploaded by

ronbhilare
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
24 views

PHP Imp

Uploaded by

ronbhilare
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 18

TPSInformation Server-Side Scripting (PHP

Iechnology (Sene)
Write Programs for the following
1 using torm.
Wnte a THP code which calculates square of any number
Ans. : Refer PHP Extra programs for practice Program No 3
2
Write a PHP code to count no. of words in the given string
Ans. : Refer PHP Extra programs for practice Program No 13
3.
Create a website with two PHP webpage in which each webpage is connected
The first Page of the website contains two form fields for taking 'name
password' from users. On onclick event, details of forms should be displayed andon
second webpage.
Ans. : Refer PHP Extra programs for practice Program No 14
Fillin the Blanks
5.2 Server Side Scripting
1. A 1S a Computer system that serves as a central repository of data and
programs.
Ans. : Server
2. The server side environment that runs a scripting language is called
Ans, : Web Server
3. PHP is .sidescripting language. (March 2022)
Ans. : Server
5.3 Features of PHP
4. PHPis ....... l.nguage, there is no need for compilation.
Ans. :Interpreted
5.4 FirstSample code of PHP
5. PHP files have extension (March 202
Ans. : .php
keyword is used to display text on web page. (March 2022
Ans. :echo
7. . is asymbol or name that stands for a value.
Ans. : Variable
8. A variable starts with the sign followed by the name of the variable.
(March 2022
Ans. :S
9. A variable nane cannot start with a
Ans,: Global
Avariable declared outside afunction has a .........scope and can only be accessed
outside a function.
(March2022
Ans Global accessed
M. Avariable declared within a function has a........SCope and can only be
(March 2022
within that function.
Ans. : Locai
TI'S nformation Technology (Science) Server-Side Scripting (PHP)
5-5

,.......are the statements output of the


12.
program.
in PHP code, which are not visible in the
Ans, : Comments
13. The
conditions.
statement allows programmer to make decision based on one
more

Ans.:if
14. The .....*..Statement allows programmer to make decision based on either tnIs o
that condition.
Ans. :if else
15. .are used to execute the same block of code
condition is satisfied. repeatedly as long as certani
Ans. : loop
16.
Ans. : foreach
.loopworks only on arrays.
17. .functions returns the length of a string. (March 2022)
Ans. :strlen)
18. ...

.functions counts the number of words in a string.


Ans. : str_ word_count()
19. function reverses a string. (March 2022)
Ans. : strrev)
20. .function searches for a specific text within a string.
Ans. : strpos)
21. function replaces some characters with some other characters in a string.
Ans. :str_replace()
22. .function returns a part of a string. (March 2022)
Ans. : substr()
23. .... function converts a string to lowercase. (March 2022)
Ans.: strtolower()
24, function counts the number of times a substring occurs in astring.
Ans. :substr_count()
5. ...onverts the first character of each word in a string to uppercase.
(March 2022)
Ans, : ucwords)
26. ..functions removes whitespace and other predefined characters from both sides
of a string (March 2022)
Ans.: trim)
5.5 PHP String Functions
27. A ......is series of characters. (March 2022)
'A28.ns.: string
A......is a block of statements that can be used repeatedly ina program.
Ans.: function
TPSInformation Technology (Sciene) 5-6 Server-Side Scripting (PHP)
5.6 PHP Arrays
29. An ........ is aspecial variable which can hold more than one value at a time.
Ans. : array
30. An storesmultiple values in single variable. (March 2022)
Ans. :array
31. The ........PHP unctions is used to create an array variable.
Ans. : array)
32. There are......types of arrays in PHP.
Ans. : Three
33. The arrays are the arrays with numeric index. (March 2022)
Ans. : Indexed
34. The ....... arrays are the arrayswith named keys. (March 2022)
Ans. : Associative
35. The arrays are the arrays containing one or more arrays. (March 2022)
Ans. :Multi-dimensional
36. The .function is used to return the length of an array.
Ans. :count)

5.7 PHPUser Defined Functions


37. A is ablock of statements that can be repeatedly in a (March 2022)
program.
Ans. : function
38. Information can be passed to functions through
Ans. : Arguments
39. are specified after the function name, inside the parentheses.
Ans. : Arguments
40. The statement is used to let a function return avalue.
Ans. : return

5.8 PHPForm Handling


41. The form data is sent with the method.
Ans. :HTTP POST
42. .is an array of variables passed via the URL parameters. (March 2022)
Ans. :$_GET
SInformaon lohnogv (Sience) Server-Side Scripting (PHP)

3.
is an aray Vanables passed via the URL parameters. (March 2022)
Ans.:$ POST
Intormation sent trOm a formm
4. with method is visible to everyone.
Ans.:GET
method may be used for sending non (March 2022)
Ans. : GET sensitive data.
Intormation sent troma form witlh
Ans. : POST method is invisible to everyone.
method has no limits on the amount of
Ans.: POST intormation to send.
object helps to connect PHP code with
Ans. :PD00 any database server.
49. method in PHP is used to check whether
Ans. :isset() variable has value or not.
50. A......is asmall text file that
Ans. : Cookie
the server sends on the user's computer.
51. .is used to identify user or its
computer. machine and track activities created on the user
Ans. : Cookie
When browser requests server page
.are sent along with the request.
Ans. :cookie (March 2022)
53. .is used to store user
Ans. :session
information on server to track user activities.
54. ..... helps web application tomaintain user
information on all the pages.
Ans. : Session (March 2022)
True or False

5.1 Introduction to PHP


1.
PHP is widely used open source general purpose scripting
language.
2Ans.:True
PHP does not supports databases.
Ans. :False
13 PHP runs on client side.
Ans.: False (March 2022)
TPS Information Technology (Science) 5-8 Server-Side Scripting (PHP
5.2 Server Side Scripting
server
4. The server side environment that runs ascripting language is termed web
Ans. : True
5. PHP hides the code fromthe user.
Ans. :True

5.3 Features of PHP

6. PHP is very difficult to use. (March 2022 An5.


Ans. :False
7. There is no need of compilation for PHP code. Ans.:
Ans. : True
8. PHPis faster than other scripting language.
Ans. : True Ans.i

You need to pay for use of PHP. (March 2022)


Ans. :False Ans. :
10. PHP is platform independent.
Ans.: True Ans.:
11. PHP is case sensitive only at the time of variable declaration.
Ans. : True
Ans. :
29
5.4 First Sample code of PHP Ans. :
12. The PHP code can also be embedded with HTML tags using <? PHP and ? > 30.
Ans. :True
13: PHP files are saved with .html extension. (March 2022) Ans.
Ans.: False
14. echo keyword is used to display text on web page. Ans,
Ans. : True
A5. Variables are used to store values. (March 2022
Ans.: True
Ans.
16. Avariable starts with $ sign, followed by name of variable.
Ans. : True Ans.
17. A variable name can starts with anumber.
Ans. :False
18. A variable name can contain only alpha-numeric characters and underscores. Ans.
(March 2022)
Ans. :True
TPS Information Technology (Sciencc) 5-9 Server-Side Scripting (PHP)
Avariable declared outside a function has (March 2022)
a GLOBAL SCOPE.
Ans. : True

20 Avariable declared withinafunction has a LOCAL SCOPE. (March 2022)


Ans. : True
21. Variables can store data of different types.
Ans. : True
22 Tocheck data type of variable var_ put ()
Ans. :False
method is used. (March 2022)
28 Comments are the non
executable statement in PHP code. (March 2022)
Ans.: True
24. Ifstatement alloOws to make decision based on one or more conditions.
Ans. : True
25. For each loop works only on arrays. (March 2022)
Ans. :True
26. StrLength() function returns the length of a string.
Ans. : False
27. Str _word_count() function counts the number of words in a string.
Ans. : True
28. Strrev() function reversesa string. (March 2022)
Ans,: True
Strpos() function returns a string. (March 2022)
Ans. : True
30. Str_replace() function replaces some characters with some other characters in a
string.
Ans.: True
31 Substr() function returns a part of a string. (March 2022)
Ans, : True
32 Strlower() function converts a string to lower case. (March 2022)
Ans. : False
D3. Substr count)function counts the number of times a substring occurs ina string.
Ans.: True
Ucwords() function converts the first characters of each word in a string to
(March 2022)
Uppercase.
Ans.: True
characters from both sides of
trim() function adds white space and other pre defined
a string.
Ans.: True
TPS Information Technology (Science) 5-10
Server-Side Scripting (PHP)
5.5 PHP String Functions
36. A string is a series of characters. (March 2022
Ans. : True
37. Afunction is a block of statements that can be used repeatedly ina program.
Ans. : True

5.6 PHP Arrays


38. Arraycan store multiple values at a time.
Ans. :True
39. In PHP, array() function isused tocreate a array. (March 2022)
Ans. :True
40. Syntax of creating array variable is a = arr (values).
Ans. : False
41. In PHP there are six types of arrays.
Ans. : False
42. An array with a numeric index is called indexed arrays.
Ans. : True
43. Multi-dimensional arraysare the arrays with named keys. (March 2022)
Ans. : False
44. Associative array contains one or more arrays.
Ans. : False
45. Array index always starts with zero.
Ans.:True
46. The len() function is used to return the length of an array.
Ans. : false
47. PHPcan handle multiple levels of multi dimensional arrays.
Ans. : True
48. We can create our own functions in PHP.
Ans. :True

5.7 PHP User Defined Functions


49. A function is a block of statements that can be used
Ans. : True
repeatedly in a program.
50. A function name cannot start with a number. (March 2022)
Ans. : True
TPS Information Technology (Science) 5-11 Server-Side Scripting (PHP)

51. Information can be passed to functions through methods.


Áns. : False
Arguments are specified after the function name, inside the parentheses.
(March 2022)
Ans.; True
(March 2022)
53. Retum statement is used to return a value of afunction.
Ans. : True

5.8 PHP Form Handling


54. The form data is sent with the HTTP Post method.
Ans. True
55. The PHI superglobals $_GET and $ POST are used to collect form data.(March 2022)

Ans. : True
56. $_GET and $_POST syperglobals which means that they are never accessible.
Ans. : False
57.
$_GET is an array of variables passed via the URL parameters.
Ans. : True
POST method. (March 2022)
58. $_POST is an array of variables passed via the HTTP
Ans.: True
59. Information sent from aform with GET method is not visible to everyone.
(March 2022)
Ans. :False
(March 2022)
60. GET has limits on the amount of information to send.
Ans. : True
61. GET should NEVER be used for sending passwords or other sensitive information.
Ans.: True
62. Information sent from a form with POST method is invisible to everyone.
(March 2022)
Ans.: True
63. POST has limits on the amount of information to send. (March 2022)
Ans.: False
64. isset() method in PHP is used tocheck whether variable hasvalue or not.
(March 2022)
Ans. : True
65. Acookie is asmall text file the client sends on the user's computer.
Ans.: False
66. When browser requests server page, cookies are sent along with the request.
Ans. :True
TPS Information Technology (Science) 5-12
Server-Side Scripting (PHp,
67.
Cookies storevisited page on browser tooptimize search.
Ans. :True (March 2022
68.
DeSSion is used to store user information on server to track user activities.
Ans. :True
69.
Session helps web application to maintain user information on all the pages.
Ans. :True
70. PHP Data Object helps us to connect PHP code in Uniform Method of
access to
multiple databases. (March 2022)
Ans. :True

MCQ (One Correct Answers)


5.1 Introduction to PHP
1.
is a widely used open source server side programming language which
runs on various platforms.
(a) Word (b) PHP (c) Excel (d) PowerPoint
Ans. : (b)

5.2 Server Side Scripting


2. A is a Computer system that serves as a central repository of data and
programs.
(a) Server (b) Network (c) Client (d) Object
Ans. : (a)
The server side environment that runs a scripting language is termed
(a) Browser (b) Computer (c) Web server (d) Client (March 2022
Ans. : (c)

5.3 Features of PHP


4. .is a scriptexecuted on server which generate
(a) PHP (b) MS Word (c) MSExcel
dynamic HTML pages.
(d) Client
Ans. : (a)

5.4 First Sample code of PHP


The PHPcode can also be embedded with
5.
HTML tags using .....
(a) <Php!> (b) <?php and ?>
(c) <=php> (d) <#php#>
Ans. : (b)
Server-Side Scripting (PHP)
lntotnnation Technologv (Science) 5-13
IIS
(March2022)
PHP filCs are SAved with extension.
(a) html (b) xml (c) js (d) php
Ans.:(d)
kevword is used to display text on web page.
(a) ch) (b) print (d) cin
(c) write
Ans.: (a)
.is a symbolor name that stands for a value.
(a) Method (b) condition (c) Variable (d) Value
Ans. : (c)
Avariable in PHP starts with the .......sign followed by name of the variable.
(a) # (b) @ (March 2022)
(c) = (d) $
Ans. : (d)
10. PHP variable name cannot starts with a (March 2022)
(a) Number (b) Character
(c) Alphanumeric (d) Dollar
Ans. : (a)
11. Correct method for declaring PHP variable is (March 2022)
(a) # age (b) $ age (c) @age (d) age
Ans. : (b)
12. Avariable declaration ..... afunction has a GLOBAL SCOPE. (March 2022)
(a) inside (b) middle (c) outside (d) topside
Ans. : (c)
13. Avariable declared . . . . afunction has a LOCAL SCOPE (March 2022)
(a) Inside (b) outside (c) between (d) within
Ans. : (d)
A. PHP stores all.......variables in an array called $ GLOBAL[Index] (March 2022)
(a) local (b) global (c) Static (d) within
Ans. : (b)
15. Tocheck data type of variable in PHP .method is used.
(a) var_dump() (b) var_del()
(c) var_remove(0 (d) var_delete()
Ans. :(a)
16. .are the statements in PHP code which are not visible in the output of the
program.
(b) comments (c) Objects (d) values
(a) Methods
Ans. : (b)
5-14
Server-Side Scripting (PHP
TPS Information Technology (Science)
17. How to add a single line comment in PHP?
(c) $ (d) @
(a) // (b) #
Ans. : (a)
18. How to amultiline comment in PHP ?
(a) // (b) # (c) $ (d) /* and */
Ans. : (d)
19. statement allows programmer to make decision, based on one or ore
conditions.
(a) if (c) variable (d) method
(March 202
(b) loop
Ans. : (a)
20, .Statement allowS programmer to make decisions based on either this or h
decision. (March 2022
(a) loop (b) if else
(c) variable (d) method
Ans. : (b) Ans.

21. ..are used to execute the same block of code repeatedly as long as a certain
condition is satisfied. (March 2022)
(a) Variable (b) Method (c) Object (d) loops
Ans. : (d) Ans
22. .loop works only on arrays. (March 2022
(a) for next (b) for (c) foreach (d) forone
Ans. : (c)
23. ........function returns the length ofa string. (March 202 Ans
(a) strrev) (b) strlen() (c) strlength) (d) substr()
Ans. : (b)
24. .....function counts the number of words in a string.
(a) strlen() (b) str_word_count()
(c) substr() (d) trim()
Ans. : (b)
functionreverses a string. (March 2022
28.
(a) strrev() (b) trim() (c) UCwords() (d) strops()
Ans. :(a)
(March 2022)
26. function searches for aspecifictext within a string.
substr() (b) strrev() (c) strpos() (d) str replace()
(a)
Ans. : (c)
Server-Side Scripting (PHP)
TPSInformation Technology (Science) 5-15

27. .function replaces some characters with same othercharacter in aStr


(a) strrev) (b) strreplace)
(c) trim() (d) strpos()
Ans,:(b)
(March 2022)
....
function returns a part of a string.
(a) substr() (b) trim() (c) strrev() (d) str_len()
Ans. : (a)
(March 2022)
29. .function converts a string to lowercase.
(a) UCwords() (b) strtolower()
(c) strlower() (d) trim()
Ans. :(b)
30. function counts the number oftimes substring occurs in a string.
(a) substr(). (b) substr_count()
(March 2022)
(c) trim) (d) strlen()
Ans. (b)
31, function converts the first character of each word in a string to upper case.
(a) substr() (b) strtolower()
(c) trim() (d) ucwords() (March 2022)
Ans.: (d)
32. ......function remnoves whitespace and other predefined characters from both sides
of a string (March 2022)
(a) trim() (b) strlen) (c) straps() (d) strrev()
Ans. : (a)

5.5 PHP String Functions


(March 2022)
33. A.....i.s series of characters.
(c) Object (d) Value
(a) String (b) Number
Åns.: (a)
in àprogram.
A........isa block of statements that can be used repeatedly
(c) method (d) variable (March 2022)
(a) function (b) class
Ans.: (a)
5.6 PHP Arrays
(March 2022)
35 variable which can hold more than one value at a time.
**...is a (d) Constant
(a) Array (b) Method (c) Object
Ans. :(a)
TPS Information Technology (Science) 5-16 Server-Side Scripting (PHP

36. In PHP function is used to create array.


(a) arr() (b) array() (c) value) (d) variable()
Ans. :(b)
37. Syntax of creating array variable is
(a) @a =arrav() (b) #a = arr()
(March 2022
(c) = array() (d) $a array (values)
Ans. : (d)
38. There are types of arrays in PHP. (March 2022
(a) Two (b) One (c) Three (d) Four
Ans. : (c)
39. ... arrayS are the arrays with a numeric index. (March 2022
(a) Associative (b) Indexed
(c) Multi-dimensional (d) Normal
Ans. :(b)
40. .arrays are the arrays with named keys.
(a) Indexed (b) Associative
(c) Dimensional (d) Normal
Ans. : (b)
41. arrays are arrays containing one or more arrays.
(a) Multi-dimensional (b) Indexed
(c) Associative (d) Numbered
Ans. :(a)
42. Array index always starts with
(a) one (b) two (c) zero (d) four
Ans.: (c)

5.7 PHP User Defined Functions


A ..... is a block of statements that can be repeatedly in a program. (March 2022)
43.
(a) function (b) condition (c) object (d) value
Ans.: (a)
(March2022
.44. Information can be passed to functions through
(a) Condition (b) arguments (c) array (d) variable
Ans. : (b)
Information Technology (Science) 5-17 Server-Side Scripting (PHP)
TPSS

5.8 PHP Form Handling


The form data is sent with the method.
45.
(a) HTTIP POST (b) FT POST
(c) STP POST (d) SMPTPOST
Ans.: (a)

6. ..is an array of variables passed via the URL parameters. (March 2022)
(a) $GET (b) #GET (c) -GET (d) @ GET
Ans.: (a)
..is an array of variables passed via the HTTP POST method. (March 2022)
(a) $POST (b) $_POST (c) @_POST (d) #_POST
Ans. : (b)
Information sent from aform with .....nethod isvisible to everyone.
(a) POST (b) GET (c) HTTP (D) FTP (March 2022)
Ans.: (b)
49. Information sent from a form with method is invisible to everyone.
(a) POST (b) GET (c) HTTP (d) FTP
Ans. : (a)
B0. .NEVERbe used for sending sensitive information. (March 2022)
(a) POST (b) HTTP (c) GET (d) FTP
Ans. : (c)
.method in PHP is used to check whether variable has value or not.
(a) outset() (b) inset() (c) noset() (d) isset() (March 2022)
Ans. : (d)
52
A....isa small text file that the server sends on the user's computer.
(a) Cookie (b) session
(c) Presentation (d) Method
Ans.: (a)
53.
.aresent along when browser requests server pages.
a) Cookie (b) Session (c) Method (d) Server
Ans. :(a)
54. i.*. 1S used to store information on server to track user activitIes.
(a) Cookie (b) session (c) Presentation (d) Object
Ans.:(b)
TPS Information Technology (Science) 5-18 Server-Side Scripting (PHh
55.
.helps web application to maintainuser information on all the pages.
(a) Session (b) presentation
(c) Cookie (d) object
Ans. :(a)

MCQ (Two Correct Answers)


5.1 Introduction to PHP

1. PHP runs on following platform.


(a) Linux (b) Excel (c) Word (d) Windows
Ans. : (a), (d)
2. PHPis compatib!le with following servers.
(a) Unix (b) XAMMP (c) Linux (d) Apache
Ans. :(b), (d)

5.2 Server Side Scripting


3. Programming languages for server side programming are
(a) PHP (b) Tally (c) Excel (d) Python
Ans. :(a), (d)
5.3 Features of PHP
Features of PHP are (March 2022
(a) Interpreted (b) Open source
(c) Difficult (d) Platform dependent
Ans.: (a), (b)

5.4 First Sample code of PHP


5. Popular PHP Frameworks are
(a) Echo (b) Laravel (c) ServerSide (d) Symfony
Ans. : (b), (d)
6. Variables are used for storing values such as .......and
(a) Methods (b) Numeric values
(c) Character Strings (d) Functions
Ans. :(b), (c)
TPSInformation Technology(Science) Server-Side Scripting (PHP)
5-19

7.
A variable starts with the sign folowed by of the variable.
(a) $ (b) # () name (d) value
Ans.: (a),(c)
A variable declared ...a function has GLOBAL sCOPE and a variable declared
.a function has LOCAL SCOPE.
(a) inside (b) outside (c) within (d) between
Ans. : (b), (c)
Followingare the data types used in PHP
(a) Boolean (b) Text (c) Number (d) Array
Ans. :(a), (d)
18. Control structures in PHP are (March 2022)
(a) for (b) if statement
(c) for each (d) ifelse statement
Ans. : (b), (d)
11. Loop structure in PHP are (March 2022)
(a) for (b) for each (c) if (d) if else
Ans. :(a), (b)
12. Comments in PHP is possible in following ways. (March 2022)
(a) // (b) \\ (c) /* and */ (d) /# and #/
Ans. : (a), (c)
13. Comments are of .and type.
(a) Single line (b) No line (c) Two line (d) Multi-line
Ans. : (a), (d)
14 Following are the pre defined functions in PHP to manipulate string. (March 2022)
(a) trim) (b) substr() (c) length) (D) strreverse()
Ans. :(a), (b)
5.7 PHP User Defined Functions

1. A function name can start with a or (March 2022)


(b) Number (c) Letter (d) Underscore
(a) symbol
Ans. :(c), (d)
5.8 PHP Form Handling
16. Form data can be submitted by.........or .method. (March 2022)
(b) forward (c) GET (d) POST
(a) Return
Ans. : (c), (d)
TPS Information Technologv (Science) 5-20 Server-Side Scripting (PHP,
17. The PHP super globals........nd....... are used to collect form data.
(c) $GET (d) $ POST
(a) $ GET (b) $TOST
Ans. :(a), (d)
parameters and .........1S an array ot
18. .is an array of variables passed via URL
variables passed via HTTPPOST method. (March 2022
(c) $ POST (d) $POST
(a) $GET (b) $ GET
Ans. : (b), (c)
information to sends whereas has no limits
19. has limits on the amount of
on the amount of information to send.
(c) GET (d) POST
(a) Value (b) Method
Ans. :(c), (d)

MCQ (Three Correct Answers)


5.1 Introduction to PHP
(March 2022)
1. PHP runs on following platforms
(b) Words (c) Linux (d) Excel
(a) Systems
(e) Unix () Windows
Ans. : (c), (e), ()
2. PHP is compatible with following servers.
(a) XAMMP (b) Linux (c) Apache
(d) Unix (e) Lightpad () Word
Ans. :(a), (c), (e)
5.2 Server Side Scripting
Programming languages for server side programming are (March 2022
(a) PHP (b) Windows (c) Linux (d) Python
(e) Unix () Java and JSP
Ane. :(a}, (d), (f)
5.3 Features of PHP
Features of PHP are (March 2022
(a) Difficult (b) Simple (c) Error Creating
(d) Platform Independent (e) Error Reporting
() Platform Dependent
Ans. :(b), (d), (e)
TPSInformation Technology (Science) Server-Side Scripting (PHP)
5-21

5.4 irst Sample code of PHP


5. Variables are used tor storing values such as . and
(a) Character (b) Numeric (c) Objects (d) Methods
(e) Functions (f) Menmory addresses (March 2022)
Ans. : (a), (b), ()
The scope of variable in PHP are (March 2022)
(a) Local (b) Regional (c) National (d)Global
(e) Static (f) International
Ans. : (a), (d), (e)
PHP data types are
(March 2022)
(a) Text (b) String (c) Number (d) Integer
(e) Empty () Boolean
Ans. : (b), (d), ()
Following are the predefined functions in PHP to manipulate string (March 2022)
(a) Lower() (b) strops() (c) substr() (d) strlen()
(e) upper() () strlength()
Ans.: (b), (c), (d)
9. Rules for declaring php variables are (March 2022)
(a) A variable name start with $ sign
(b) A variable name can start with a number
(c) Variable names are case sensitive
(d) A variable same start with *sign
e) A variable name cannot start with number
(f) Variable names are no case sensitivity
Ans.: (a), (c), (e)
10 Comments in PHP can be given using and
(a) # (b) * (c) // (d) $ (e) /* () ^
Ans.: (a), (c), (e)
5.6 PHP Arrays
In PHP three types of arrays are (March 2022)
(a) inside (b) multiple
(c) indexed (d) associate
(e) outside () multi-dimensional
Ans.: (c), (d), (f)

You might also like