The mysqli_data_seek() function adjusts the result pointer to an arbitrary row in the result-set.
mysqli_data_seek(result,offset);