Originally Posted by shabbir
Ok. I used r+ and added some more logic to it.
$fh = fopen($ourFileName, 'r+') or die("Can't open file");
$fh = fopen($ourFileName, 'w') or die("Can't open file");
But still I am not getting expected result.
now the result is as follows: