explode returns an array. How to make explode work inside an array?
Listing file.dat is like this:
string=8:1 string=15:1 string=26:1 string=30:10 string=18:10 string=2:10 We read the file file.dat :
$dat = file('file.dat'); $dat = str_replace(":", "=", $dat); // где то тут всаживаем explode(); $count = count($dat); for($i = 0; $i < $count; $i++) { echo $dat[$i] . '<br />'; // string=8:1 нужно получить как [0] [1] [2] }