I have a piece of code:
foreach (glob('mov/$context.mov') as $filename){
$theData = file_get_contents($filename) or die("Unable to retrieve file data");
}
Is that the correct way to add a variable within that glob? $context
Also, in my new file, I want to replace a word with $context, so would I write
$context = "word"; // so it adds that word to the glob function when the script is included in a different file.