Forum Moderators: coopster
if (preg_match('/(text1)(.*)(text2)/', $data, $match))
After displaying the match in between which is match[2]
it does not read & display the other text in between match which is below the context of the file.
How do i get it to display the other matches below & then display it?
Thanks in advance
So I tried using $value = array_unique($match);
But it still wouldn't filter & display unique records only - How do I get that function to work properly?
Thanks
Ok, finally got it to work. :)
i suppose you could do something like
echo "<table>";
foreach($match as $key => $value){
$display = 1;
foreach($match as $key2 => $value2) {
if (($value2 == $value) && ($key2!= $key)) { $display = 0; }
}
if ($display) {
echo "<tr><td>$key</td><td>$value</td></tr>";
}
}
i'm sure this isn't very efficient, but i suppose it should work