I have a multidimensional array like this
Array
(
[0] => Array
(
[0] => Foo
[1] => Bar
[2] => I like foobar
[3] => 09/09/2014
)
[1] => Array
(
[0] => Foo2
[1] => Bar2
[2] => Very much
[3] => 10/09/2014
)
)
keys array which looks like this
Array
(
[0] => From
[1] => To
[2] => Text
[3] => Schedule Date
)
and a message is a string variable
$message = "Hi {To} message is from {From} come get {Text}.
My question is how do I replace the keywords between {$key} for all the array values at the same time to produce a new $messages array containing the messages with keywords replaced?
This has to be done dynamically and not hard coded because different values will be used every time.
{from}?