I need to search inside the string and replace it with the current date
This what i have tried yet. It works fine, it replaces the date into the current date, but the problem is, that I need the initial date to be dynamic, so i can use any date.
<?php
$string = 'we will be held the event in 12/2017 . and waiting for your ..';
$anydigit = '12/2017';
$str = str_replace($anydigit, date(), $string);
var_dump ($str);
?>
<div class="container">
<div class="row">
<div class="col-md-12">
<div class="panel panel-default>
<div class="panel-body">
<p> we will be held the event in 12/2017 . and waiting for your </p>
</div>
</div>
</div>
</div>
</div>