I use PHPExcel to put elements of my Excel file into an array. I then do
print_r($worksheets);
Where $worksheets is the array created through PHPExcel. The output is
Array (
[enquiry] => Array (
[0] => Array (
[0] => 86.141.247.93
)
[1] => Array (
[0] => 188.141.76.143
)
[2] => Array (
[0] => 2.29.20.161
)
)
)
What I need to do is pass each of these IPs as a String to a function. So what I am trying is this
foreach($worksheets as $ip) {
$count = 0;
if ($SpamProtecter->CheckIP($ip[$count][0])) {
print_r("SPAM");
} else {
print_r("GOOD");
}
$count++;
}
The problem I have is that it only prints out one result. How can I pass each array element as a String to CheckIP?
Thanks