$rows
is undefined in your function, you need to send it as a parameter:
function extractInfo($rows, $e){
$returnImpressionsRow = $rows[$e][4];
$returnClicksRow = $rows[$e][5];
$returnCompletedViewsPercentage = $rows[$e][7];
$returnCPM = $rows[$e][8];
$returnTotalSpend = $rows[$e][9];
$clientName = $rows[$e][11];
$finalPercentage = substr($returnCompletedViewsPercentage, 0, -1);
$finalCPM = substr($returnCPM, 1);
$totalSpend = substr($returnTotalSpend, 1);
return $clientName . " Impressions: ". $returnImpressionsRow . " Clicks: " . $returnClicksRow. " Completed Views: " . $finalPercentage . "%" . " CPM: $" . $finalCPM . " Total Spend: $" . $totalSpend;
}
...
extractInfo($rows, 0);
Check about variable scope in the php manual.