I'm having trouble with this if statement:
if($line[$c]=$ignore
{
$num--;
}
$ignore is defined as the string "ig"
$line is an array containing 5 items, some of which may be "ig"
$num starts out as a number representing the number of values in $line
The if statement you see above is nested inside a small for loop that
simply runs throught the process 5 times, and goes through the array
$line. At each point it is SUPPOSED to check and see if the current
value of $line at that particular slot ($c) is equal to "ig". If so,
then it decrements $num by 1.
My problem is it doesn't seem to care whether or not $line[$c] equal
"ig" or not. It's just decrementing $num all willy nilly.
AceX
if($line[$c]=$ignore
{
$num--;
}
$ignore is defined as the string "ig"
$line is an array containing 5 items, some of which may be "ig"
$num starts out as a number representing the number of values in $line
The if statement you see above is nested inside a small for loop that
simply runs throught the process 5 times, and goes through the array
$line. At each point it is SUPPOSED to check and see if the current
value of $line at that particular slot ($c) is equal to "ig". If so,
then it decrements $num by 1.
My problem is it doesn't seem to care whether or not $line[$c] equal
"ig" or not. It's just decrementing $num all willy nilly.
AceX