hmmm.. I havn't used this type of account holding, but from my point the
$count=fscanf($fh1,"%d"); will let $count hold the value in the file (if the file only holds one number) thus the statement
$count[0] won't return the correct value, instead
$count will be the way to get the number.
How about something like:
PHP Code:
fscanf($fh1, "%[0-9]", $count);
Your
$newcount should be formed in the way, where
$newcount[0] is holding the actual value, thus you would need to make your increment line something like:
PHP Code:
$count+=$newcount[0];
:: edit
I just realize, I dont even know what your
GetICMSData() is doing, so I can't comment on wether $newcount is the value or $newcount[0], my suggestion was formed given the fact, that
PHP Code:
$res = mysql_query("SELECT COUNT(*)...");
value = mysql_fetch_array($res);
makes $value hold the number in the way I describe $newcount.