note 41059 added to function.sqlite-escape-string

From: Date: Mon, 29 Mar 2004 06:03:23 +0000
Subject: note 41059 added to function.sqlite-escape-string
Groups: php.notes 
Request: Send a blank email to php-notes+get-67301@lists.php.net to get a copy of this message
sometimes i you have to escape an array instead of a string. my function to do it works like: array sqlite_escape_array ( &array string) <?php function sqlite_escape_array(&$arr) { while ( list($key, $val) = each($arr) ): if ( (strtoupper($key)!=$key OR "".intval($key) == "$key") && $key!="argc" and $key!="argv"): if (is_string($val)): $arr[$key]=sqlite_escape_string($val); endif; if (is_array($val)): $arr[$key]=sqlite_escape_array($val); endif; endif; endwhile; return $arr; } ?> ---- Manual Page -- http://www.php.net/manual/en/function.sqlite-escape-string.php Edit -- http://master.php.net/manage/user-notes.php?action=edit+41059 Delete -- http://master.php.net/manage/user-notes.php?action=delete+41059&report=yes Reject -- http://master.php.net/manage/user-notes.php?action=reject+41059&report=yes Search -- http://master.php.net/manage/user-notes.php

« previous php.notes (#67301) next »