Re: single quote in data breaks file load
Roland Bouman wrote:
> while ( ( $data = fgetcsv($Handle, 384) ) !==
> FALSE) {
> array_walk(&$data, 'my_mysql_real_escape_string');
> list(...) = $data;
> ...
> }
Bummer, I get this message when executing it:
PHP Warning: Call-time pass-by-reference has been deprecated - argument passed by value; If you would like to pass it by reference, modify the declaration of array_walk(). If you would like toenable call-time pass-by-reference, you can set allow_call_time_pass_reference to true in your INI file. However, future versions may not support this any longer. in /var/lib/mysql/Import-cdrcleanup.php on line 53
Line 53 is array_walk(&$data, 'my_mysql_real_escape_string');
I'd prefer not to use a depreciated function for obvious reasons. Any other way to do this?