Hi,
I want to get the template words in a string. Template in the sense of words in {} inside a string. I am adding here a code to explain what I want exactly.
$string = "Hi {username}, Here is your {password}";
function get_template_variables($string)
{
....
....
return array();
}
$result = get_template_variables($string);
print_r($result);
array[
0 => username,
1 => password
]
I hope you understand what I need. I need the definition program to be used inside the get_template_variables($string)
method