hey guys
im looking for a way to read a file into an array and get what i want .
this is the code i used to read a file into an array
$Path = 'dewp/pix/info.txt';
$productsArray = file($dirPath, FILE_IGNORE_NEW_LINES);
foreach ($productsArray as $key => &$product) {
$arr = explode("\t", $product);
$product =array('album=' => $arr[0], 'singer=' => $arr[1], 'info=' => $arr[2]);
}
echo "$product['album']";
and my txt file contains :
album= Prisoner
singer= Jackobson
info= Love song about GOD , so so so so .
but nothing happened and i couldnt get album - singer or info string !
i need to explode special strings like album= to find out the values !