I have string like
$text = "Hello :name its your :num_visit";
and Array
$attr = [ ":name" => "Danny", ":num_visit" => 6];
I want to replace $text's patterns like :name, :num_visit with given values in array (Array have same key names).
Is it possible with php?