I have to create a page, where the user is able to search a suburb and the page will print the postcode of that suburb.
I am having a little difficulty with putting the data from the .txt
document into the variables for the associative array.
Thanks for your help.
This is what I have so far.
<?php
$file = "postcode.txt";
$handle = fopen($file, 'r');
$postcodearray = file($file);
$suburb = explode(",", );
$postcodearray[$suburb] = $postcode;
fclose($handle)
?>
and this is the format of the .txt document...
3000,MELBOURNE
3001,MELBOURNE
3002,EAST MELBOURNE
3003,WEST MELBOURNE
etc.