hi
i have this data in assoc.txt
myfriend1|hisjobs1|hisaddress1
myfriend2|hisjobs2|hisaddress2
and my script
<?php
// get contents of a file into a string
$filename = "person/assoc.txt";
$handle = fopen($filename, "r");
$contents = fread($handle, filesize($filename));
$findme = 'hisjobs2';
$pos = strpos($contents, $findme);
$domain = strstr($contents, 'George');
$prima=explode("|",$domain);
//get length
$jj= count($prima);
//display
for($j=0;$j<=$jj;$j++)
{
echo $prima[$j];
echo " ";
if ($j>=1)
{
echo "<br>";
}
}
// close file
fclose($handle);
?>
the problem is it's just display "hisjobs2|hisaddress2"
how i can display "myfriend2|hisjobs2|hisaddress2"
thanks