Php Interview Question and Answers
21. |
Which modifier would you use in a PCRE function to match a pattern independently of case? |
|
The /i modifier will make a PCRE function match independently of case. |
|
|
22. |
How can you associate a variable with a session? |
|
You set an element in the superglobal $_SESSION array. |
|
|
23. |
Which function is designed to allow you to set a cookie on a visitor's browser? |
|
The setcookie() function enables you to set a cookie (although you could also output a Set-Cookie header using the header() function).
|
|
|
24. |
Which element in the $_SERVER array can contain the raw query string? |
|
The entire query string is made available to you in the $_SERVER['QUERY_STRING'] element. |
|
|