I am currently writing an algorithm for searching a text file.(i believe this is called binary searching.)
I am taking the beinning row number (B_row) minus the last row number (L_row)= compaire number (C_num)
then divide by two and see where the value i am searching lies. if it is in the top part, set C_num as L_row and keep going till it finds it. mathmaticallic the actual searching is much much less than a fread.
anyway, my question is: when i get a decimal like this
--> compaire - 32768.5
high - 65536
low - 1
i want to make it a whole number. (like 32768)
i have searched and read, and cannot seem o find a function suited for this. i found
--> settype($C_num, "integer");
anyone have a helpful suggestion?