Which PHP function is used to split a string by a specified character or string?
- explode()
- substr()
- split()
- str_split()
The explode() function in PHP is used to split a string by a specified character or string. It returns an array of substrings. The other options are not used for this specific purpose.
Loading...
Related Quiz
- PHP is case-sensitive for variable names.
- Which of the following are common uses of the $_REQUEST superglobal in PHP?
- You are writing a PHP script and you need to make a form field required. How would you do this?
- How can we check if the value of a given variable is alphanumeric?
- You are writing a PHP script and you need to access data that was submitted from a form using the POST method. How would you do this using a superglobal?