In PHP, which function is used to get the length of a string?
strlen()
count()
sizeof()
strlength()
In PHP, the
strlen()
function is used to determine the length (number of characters) of a string. It's particularly useful for validating input or working with text data.
Loading...
Related Quiz
- Which of the following are common uses of Form Handling in PHP?
- How is the comparison of objects done in PHP?
- The main purpose of a constructor in a PHP class is to initialize the object when it is created.
- What are some of the uses of interfaces in PHP OOP?
- What function is used to open a file in PHP?