Discussion :: PHP - CS
-
What will be the output of the following PHP code?
<?php
$author = "nachiketh@example.com";
$author = str_replace("a","@",$author);
echo "Contact the author of this article at $author.";
?>
A.
Contact the author of this article at nachiketh@ex@mple.com |
B.
Cont@ct the @uthor of this @rticle @t n@chiketh@ex@mple.com |
C.
Contact the author of this article at n@chiketh@ex@mple.com |
D.
Error |
Answer : Option C
Explanation :
The str_replace() function case sensitively replaces all instances of a string with another.
Be The First To Comment