i need some help..lets say i have a text file with data separated by a | for example in the format:
user|address|email
user|address|email
user|address|email
I have a search page with a text box and submit button...and lets say i want to saerch for keywords in the address field.... since the address contains spaces, my search thing is all wack....its only looking at the first word in each address field...... how can i make the search thing look at the entire address field....
i think i need to make an array...but i dont know now..can someone specifically help me.... also i tried using print_r() statement...but it doesnt work...the page doesnt load up..maybe my host doesnt have PHP 4.0?? so i might need a php3 alternative...
HEres the code im using now.....
<?
if (($Submit==\"Submit\") || ($aaa==\"post\")){
$fp = fopen (\"info.txt\", \"r\");
while (!feof ($fp)) {
$contents= fgets($fp,100000);
list ($user, $address, $email) = explode(\"|\", $contents);
if ($address==$int1) {
print $user;
print $address;
print $email;
}
else {
print \"\";
}}
}
else{
print \"\";
}
?>
THANKS IN ADVANCE