Beginner PHP
Q40 / 100

What does str_replace() do?

Correct! Well done.

Incorrect.

The correct answer is B) Finds and replaces occurrences of a substring in a string

B

Correct Answer

Finds and replaces occurrences of a substring in a string

Explanation

str_replace("cat", "dog", "the cat sat") returns "the dog sat". It is case-sensitive; str_ireplace() is case-insensitive.

Progress
40/100