Articles → PHP → Str_Replace Function In PHP

Str_Replace Function In PHP






Purpose





Example


<!DOCTYPE html>
<html>
	<body>
		<!-str_replace example->
		<?php
echo str_replace("world","planet","Earth is the 3rd world after Mercury and Venus!");
?></body>
</html>





Output


Picture showing the output of str_replace function in php
Click to Enlarge


Posted By  -  Karan Gupta
 
Posted On  -  Friday, October 9, 2020

Query/Feedback


Your Email Id
 
Subject
 
Query/FeedbackCharacters remaining 250