to the end of this line $imgstring = $imgstring . ""; } print "            $imgstring"; $fp = fopen($counterFile,w); fputs($fp,$num); fclose($fp); } if (!file_exists($counterFile)) { $num = 0; fputs($fp,$num); } displayCounter($counterFile); ?>