Try to get arrays from a file like...
data.txt
Array
(
[0] => 288
[1] => 287
[2] => 173
)
my.php
$data = file('data.txt');
foreach ($data as $id) {
echo $id." - ";
}
Why its echo all arrays back ? like data.txt
Why not echo like 288 - 287 - 173 ?
CLOSED : I using JSON now
data.txtfile actually contain the result ofprint_r?serializeformat.When you read data thenunserialize