I have an array of integers
Array
(
[0] => Array
(
[0] => 1531412763
[1] => 1439959339
[2] => 76
[3] => 122
[4] => 200
[5] => 4550
[6] => 444
)
...
And so on, I suppose if I look at it as if it were a database - the elements of the outermost array are the rows and the elements of the inner arrays are the columns.
I want to save that information into a file, so that I will be able to retrieve it later but I want to save it as binary data to save space. Basically if I write the first integer from the example 1531412763
to a file it will take up 10 bytes but if I could save it as a signed integer it would take up 4 bytes.
I have looked at a number of other answers which all suggest using fwrite
which I can't understand how to use in such manner?