I have a text like this,
$string = "I have some fruits like [name], [another_name] and [one_another_name]";
And an array like this,
$fruits_array = array("Banana", "Apple", "Orange");
Now, how can I replace the texts between braces by following array?
I want a result like this,
I have some fruits like Banana, Apple and Orange.
Please provide the actual solution.
Thanks in advance.