Issue
Basically, what I want is to access the data between substrings (between “name:” and “email:”, for example)
What’s the best way of doing this?
Solution
you can first explode on space…
$array = explode(' ',$string);
and then explode on : while looping through….
foreach($array as $arr){
$temp = explode(':',$arr);
echo $temp[1]; // your value here
}
Answered By – Brandon Frohbieter
Answer Checked By – David Goodson (BugsFixing Volunteer)