Hi again, and thanks for all your help.
The problem im still having is that when the username is submitted I need to be able to referance just that username's array elements.
Code:
$file = 'file.txt';
$username = 'bob';
$array = file($file);
foreach($array as $key => $var){
$var = explode('|', $var);
if($username == $var[0]){
$user = $var;
break;
}
}
if(!isset($user))
echo 'No user found';
else echo 'User found';
foreach ($var as $key => $value){
print "<p>key = $key and value = $value</p>";
}
My foreach still just displays the last array (line of text from file)
Sorry to keep bugging, and I am also trying very hard to work this one out myself, but I cant get my head around this one.
Hope you can understand what im trying to achive.
If this page receives the username via $_GET I want to find a way of having that username's line of info from the text file in an array for further manipulation.
Any help with this is greatly apreciated.
Regards Kyle