menu

PHP Functions


1. Which PHP function is used to create an array?

array()

create_array()

make_array()

build_array()


2. Which PHP function is used to calculate the absolute value of a number?

abs()

absolute()

val()

value()


3. Which PHP function is used to get the length of a string?

strlen()

string_length()

length()

str_length()


4. Which PHP function is used to remove white space from the beginning and end of a string?

trim()

remove_whitespace()

strip()

clean()


5. Which PHP function is used to sort an array in ascending order?

sort()

ascending()

arrange()

order()


6. Which PHP function is used to remove elements from an array?

unset()

remove()

delete()

pop()


7. Which PHP function is used to replace a portion of a string with another string?

str_replace()

replace()

string_replace()

swap()


8. Which PHP function is used to convert a string to uppercase?

strtoupper()

to_uppercase()

upper()

convert_upper()


9. Which PHP function is used to convert a string to an array?

explode()

string_to_array()

str_array()

make_array()


10. Which PHP function is used to convert a string to lowercase?

strtolower()

to_lowercase()

lower()

convert_lower()