GkSeries.com

PHP Multiple Choice Questions and Answers

(6) Which function is used to remove HTML Tags from a string in PHP?
[A] regex
[B] strip_tags()
[C] replaceAll()
[D] stripHtmlTags()

Comment

Answer: Option [B]

The strip_tags() function removes HTML tags from a string

(7) Which function is used to decode URL encoded strings in PHP ?
[A] HttpUtility.UrlDecode()
[B] URLDecoder()
[C] getByte()
[D] rawurlencode()

Comment

Answer: Option [D]

The rawurldecode() function decodes URL-encoded strings in PHP

DOWNLOAD CURRENT AFFAIRS PDF FROM APP

(8) Which function is used to convert Ampersands(&) to &, Double quotes("") to " in PHP
[A] htmlDecode()
[B] regex
[C] htmlspecialchars()
[D] parse()

Comment

Answer: Option [C]
(9) Which function is used to compare strings as strings in PHP ?
[A] startswith()
[B] strcmp()
[C] compare()
[D] compareTo()

Comment

Answer: Option [B]

To compare strings as strings in PHP strcmp() is used.

(10) In PHP, which function converts strings to lowercase before comparing them ?
[A] lower()
[B] toLowerCase()
[C] strcasecmp()
[D] lc()

Comment

Answer: Option [C]

Please share this page

Chapters

Click Here to Read more questions

Teacher Eligibility Test