I'm trying to make an alert alert script for my local volunteer fire brigade, and I'm stuck.
I have a delimited txt file called preplan.txt containing lines like this:
Line1: REF00001 | NAME1 | ALERTADDRESS1 | LINK2DOWNLOADPDFINFOONADDRESS1 | NOTESONADDRESS1
Line2: REF00002 | NAME2 | ALERTADDRESS2 | LINK2DOWNLOADPDFINFOONADDRESS2 | NOTESONADDRESS2
Line3: REF00003 | NAME3 | ALERTADDRESS3 | LINK2DOWNLOADPDFINFOONADDRESS3 | NOTESONADDRESS3
etc.
I also have a line called $ jobadd, which is the address for the job ...
What do I need to do in php, if the job address is the same ($ jobadd) as any of the Alert Addresses in the txt file, then display the corresponding name, address, link and notes. It is also necessary to ignore whether it is capitalized or not. Basically, if $ jobadd = address in a txt file displays this information ...
It seems I am only echoing the last line.
source
share