Real simple one for someone. I've forgotten the terminology, so I'm having trouble finding a question I'm sure has already been answered.
I'd like to read the contents of a file that's included in the script itself eg.
<php
// NOTE: code is not correct, just illustrative.
// read 'file' data at end of script
$inlineFile = fopen(___FILE_HERE___,"r");
while ($rec = fgetcsv("\t", $inlineFile)) {
// process file record
}
__FILE_HERE__
zzz 123 5445
aab 494 2983
__END_OF_FILE
?>
What is this technique officially called (eg. 'In-line data?') - if I know the term, I'll be off and away coding it I'm sure. UPDATE: I did find inline data eg.
$dutyCodesInline=<<<END
AL Annual Leave LEAVE_ANNUAL LEAVE
BL Long Service Leave LEAVE_LSL LEAVE
UW Unworked Workers Comp. LEAVE_OTHER LEAVE
END;
but my preference is to read the data as if it were a file (because one day it will probably be a file).