Soldato
Hope people can help me, I am trying to build some validation into my script that updates statistics each week.
I have an array that has $ThisWeeksStats in it and I want to ensure it is not equal to $LastWeeksStats and to ensure that $ThisWeeksStats is numeric
I realise that statistically it is possible to have the same stats but it is highly unlikely to happen
I currently have:
$ThisWeeksStats consists of:
$LastWeeksStats consists of:
The if statement doesn't seem to work so I am assuming it isn't comparing the arrays properly?
I have an array that has $ThisWeeksStats in it and I want to ensure it is not equal to $LastWeeksStats and to ensure that $ThisWeeksStats is numeric
I realise that statistically it is possible to have the same stats but it is highly unlikely to happen
I currently have:
PHP:
if ($ThisWeeksStats != $LastWeeksStats && is_numeric($ThisWeeksStats)) {
print '$ThisWeeksStats';
}
else {
print 'either the numbers are equal to each other or there isnt numerics in this weeks results';
}
$ThisWeeksStats consists of:
Code:
key: 0 , value: 976
key: 1 , value: 830
key: 2 , value: 444
key: 3 , value: 898
key: 4 , value: 2325
key: 5 , value: 1599
$LastWeeksStats consists of:
Code:
key: 0 , value: 5103
key: 1 , value: 1367
key: 2 , value: 790
key: 3 , value: 665
key: 4 , value: 88
key: 5 , value: 5432
The if statement doesn't seem to work so I am assuming it isn't comparing the arrays properly?