πŸ“Š PHP
Q. What is the result of the following PHP code?
Code:
<?php
    $mail = "admin@example.com";
    $mail = str_replace("a","@",$mail);
    echo "Contact me at $mail.";
?>
  • (A) Contact me at @dmin@ex@mple.com.
  • (B) Contact me at admin@example.com.
  • (C) Contact me at adminaexample.com.
  • (D) Contact me at $mail.
πŸ’¬ Discuss
βœ… Correct Answer: (A) Contact me at @dmin@ex@mple.com.

Explanation: The built-in function The str_replace() replaces some characters with other characters in a string.

Explanation by: Akshay Kulkarni
The built-in function The str_replace() replaces some characters with other characters in a string.

πŸ’¬ Discussion


πŸ“Š Question Analytics

πŸ‘οΈ
174
Total Visits
πŸ“½οΈ
3 y ago
Published
πŸŽ–οΈ
Akshay Kulkarni
Publisher
πŸ“ˆ
82%
Success Rate