Reading file into dynamic array failed

In reply to dave_59:

that could the answer, but “data_array” calls $fread first, and still, it is “data_array”, what stores zeroes, and “video_data” stores true values, read from file (still, it calls $fread second). However, i tried to do, what you recommended, now my code is:


$frewind(file_id);
a = $fread(data_array, file_id);
$frewind(file_id);
a = $fread(video_data, file_id);

but nothing changed. “data_array” still stores zeroes.