i want to import a file and then use the items in variables
i have the file imported i also turn it into chunks with explode
now i tried preg_replace to get rid of certain charaters i need to get rid of " character from the file then split it by , and ideas or a kick in the right direction would be appreciated
i also tryed to preg by , but still cnat get it right

my code now

//==========================================================================================================
// READ CVS FILE (GET DATA FROM FILE)
//==========================================================================================================

$myFile = "products.csv";
$fh = fopen($myFile, 'r');
$theStuff = fread($fh, filesize($myFile));
fclose($fh);
//echo $theStuff;


//==========================================================================================================
// explode data into arrays
//==========================================================================================================
//preg_replace(',', "", $thestuff);

$chunks = explode(',', $theStuff);
echo $chunks[1];

suprisingly i did not find that in my travels of the world wide web thanks for the reply

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.