PHP rewind() Function

PHP rewind() Function


Define :

In this tutorial we have to learned about PHP rewind() Function.The php-rewind() is inbuilt function.This function is used to 

 sets the file position indicator for specified file stream to the beginning of the file stream.

Syntax :
rewind(stream)

Example :

Lets assume that we have a file called demo.txt. This file contains following content:

This is a demo file.
Hello ! welcome to Web Designing House
 
Output : This is a demo file.
               This is a demo file.