supposed there is a folder named example, and in it there are some csv file eg(a.csv, b.csv....).
the test.php directory is the same as example folder. now i want to pass all the csv file name to the following if condition. namely, replace test.csv with all the csv file name
if (($handle = fopen("test.csv", "r"))
how do i do?
i using the following code:
$files= glob("./example/*.csv");
if (($handle = fopen("$files", "r"))
but it doesn’t work. thank you.
$filesis an array, you need to loop with it.