Hello,
How can I fix this error? “$number_of_characters += strlen($row[$j]);”
$s = 0;
while ($row = $result->fetch_row()) {
$s++;
$return .= '(';
for ($j = 0; $j < $num_fields; $j++) {
$row[$j] = addslashes($row[$j]);
$row[$j] = str_replace(array("\n","\r"),array('\\n','\\r'),$row[$j]);
$number_of_characters += strlen($row[$j]);
if (!empty($row[$j]) OR $row[$j] == "0") {
if (preg_match($virgullu,$row[$j])) { // 12.1234 ve 0.000
$return .= "'" . $row[$j] . "'";
} else if (preg_match($tamsayi,$row[$j])) { // 123456
$return .= "" . $row[$j] . "";
} else { // metin
$return .= "'" . $row[$j] . "'";
}
} else { // Veri olmayan sütunlar
if (is_array($null_array) && array_key_exists(( $j + 1 ), $null_array) && "YES" == $null_array[( $j + 1 )]){ // Veri olmayan sütunlarda DEFAULT NULL mu değil mi
$return .= "NULL";
}else{
$return .= "''";
}
}
if ($j < ($num_fields - 1)) {
$return .= ', ';
}
}