\n"; print "Foxtons\n"; print "sales@foxtons.com\n"; print "\n" ; //This puts a line of text from the file into $aLine for($myCount=0; $myCount"; //compares the value of the third field with the user input maximum rental level ('maxPrice') for ($x=0; $x<4;$x++) //if rentLevel is smaller or equal to 'maxPrice' then, { $aWord = getValue($aLine,$x); if ($x==0){print "\n". $aWord . "\n";} if ($x==1){print "" . $aWord . "\n";} if ($x==2){print "" . $aWord . "\n";} if ($x==3){print "" . $aWord . "\n";} //prints each word } print "\n"; //print "

"; //end of inner loop } //end of outer loop print "
\n"; print "\n"; function getValue($text,$position) //create the two variables to hold the passed values, ie the word in position 0 in the line { $intoArray = explode(",",$text); //explode reads the text up to a comman, according to the passed values return $intoArray[$position]; //returns the text between commas to where it was called in the code, puts the result into $aWord } //end of function getValue fclose ($filePointer); //close filePointer ?>