Saturday 19 September 2015

str_replace in php

Replace characters from a variable using str_replace.
<?php
$Article = "This is my first paragraph.";
echo str_replace('paragraph' ,'Article', $Article);
?>
//: Output
This is my first Article.

No comments:

Post a Comment