Working on a project where I need to loop through an array, find a specific value such as "Full Name:", for example, and echo that value, along with the next value in the array ( which is the name itself ). Then do the same for the next occurrence of "Full Name:", echo it and the next value, and so on.
I am still struggling to understand how "foreach" works, and not even sure that's what I'm supposed to use.
What I got so far:
<?php
$list = file_get_contents('list.txt');
$array = explode("\r\n", $list);
foreach ($array as $value) {
not-sure-what-goes-here;
}
?>
Any help or pointers would be greatly appreciated.