I have one file. but now need to read this file into a bytes array. In java or c++ it\'s very easy to do that. but not found how i can read in PHP.
too much php>
$data = file_get_contents("/tmp/some_file.txt");
best way to make for (not recomended in for use count, sizeof, strlen or other functions): $counter = strlen($data); for($i = 0; $i < $counter; ++$i) { $char = data[$i]; echo "Byte $i: $char\n"; }
$counter = strlen($data); for($i = 0; $i < $counter; ++$i) { $char = data[$i]; echo "Byte $i: $char\n"; }