menu

PHP Functions


1. Which PHP function is used to redirect a user to a different URL?

header()

redirect()

location()

navigate()


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 remove elements from an array?

unset()

remove()

delete()

pop()


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

sort()

ascending()

order()

arrange()


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

strlen()

string_length()

length()

str_length()


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

strtolower()

to_lowercase()

lower()

convert_lower()


7. Which PHP function is used to round a number to the nearest integer?

round()

ceil()

floor()

int()


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

array()

create_array()

make_array()

build_array()


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

trim()

remove_whitespace()

strip()

clean()


10. Which PHP function is used to get the value of a specific cookie?

$_COOKIE[]

get_cookie()

cookie_value()

fetch_cookie()