This shows the texts to check whether it matches the format inside the curly brackets, and it does.
$file = file_get_contents("C:/xampp/htdocs/gomanga/data/account/Getto/favorites/favorites.txt");
echo $file; // shows the data: Update here,Gez,Box,Corn,Asero
Here, putting the data manually shows my desired output.
$dir = glob("C:/xampp/htdocs/gomanga/central/{Update here,Gez,Box,Corn,Asero}", GLOB_BRACE);
foreach($dir as $d){
echo $d.'<br>';
}
But this doesnt work, $file has the same data as the previous
$dire = glob("C:/xampp/htdocs/gomanga/central/{$file}", GLOB_BRACE);
print_r($f); //returns no result just Array ()
foreach($dire as $f){
echo $f.'<br>'; //no result
}
favorites.txt will be updated by the users so I want the above code to work. Maybe I'm reading the txt file wrong?