$maxLen) { $maxLen = $result; $maxNum = $i; } } echo "The longest chain starts at $maxNum and has length = $maxLen.\n"; ?>