I would like to know how to do this, take a file that contains something such as this:
50,1,138,1000,50,96,(Everclear) - Heroin Girl
and put each value into its own variable ($var1, $var2, etc).
Any/all help would be appreciated.
<? $file = "/path/file.txt"; $fp = fopen($file, "r"); $vars = fread($fp, filesize($file)); fclode($fp); $vars = explode(",", $vars); echo $var[0]; //would echo 50 echo $var[1]; //would echo 1 echo $var[2]; //would echo 138 //and so on. ?>