In PHP, the ________ function can be used to return a part of a string.
- substr()
- split()
- slice()
- cut()
The 'substr()' function in PHP is used to extract a portion of a string. It takes the original string and specifies the start and length of the substring to be returned.
Loading...
Related Quiz
- In PHP, a function is a self-contained block of code that performs a specific task.
- What are some of the uses of class constants in PHP OOP?
- A variable declared outside all functions in PHP is considered to have a ______ scope.
- What are the differences between a class constant and a class variable in PHP?
- You have a PHP script and you need to read a file. How would you do this?