#40097 [NEW]: Using functions on each implode()-item
| From: | marcel dot normann at experimentierkasten dot de | Date: | Thu, 11 Jan 2007 07:44:07 +0000 |
| Subject: | #40097 [NEW]: Using functions on each implode()-item | ||
| Groups: | php.bugs | ||
| Request: | Send a blank email to php-bugs+get-107451@lists.php.net to get a copy of this message | ||
From: marcel dot normann at experimentierkasten dot de
Operating system: all
PHP version: 6CVS-2007-01-11 (CVS)
PHP Bug Type: Feature/Change Request
Bug description: Using functions on each implode()-item
Description:
------------
implode() is often used for doing such things like
$sSql = "select * from somewhere where something in
('".implode("','",$aArray)."')";
This is nice for SQL injection. Maybe it would be a good idea to add a
possibility to implode() for manipulating each implode()-item:
string implode ( string glue, array pieces [, callback callback])
$aArray = array('some','boring','items');
echo implode('-',$aArray,'ucfirst'); // = Some-Boring-Items
This example is not very usefull but imgine the use of
mysql_escape_string() instead.
--
Edit bug report at http://bugs.php.net/?id=40097&edit=1
--
Try a CVS snapshot (PHP 4.4): http://bugs.php.net/fix.php?id=40097&r=trysnapshot44
Try a CVS snapshot (PHP 5.2): http://bugs.php.net/fix.php?id=40097&r=trysnapshot52
Try a CVS snapshot (PHP 6.0): http://bugs.php.net/fix.php?id=40097&r=trysnapshot60
Fixed in CVS: http://bugs.php.net/fix.php?id=40097&r=fixedcvs
Fixed in release: http://bugs.php.net/fix.php?id=40097&r=alreadyfixed
Need backtrace: http://bugs.php.net/fix.php?id=40097&r=needtrace
Need Reproduce Script: http://bugs.php.net/fix.php?id=40097&r=needscript
Try newer version: http://bugs.php.net/fix.php?id=40097&r=oldversion
Not developer issue: http://bugs.php.net/fix.php?id=40097&r=support
Expected behavior: http://bugs.php.net/fix.php?id=40097&r=notwrong
Not enough info: http://bugs.php.net/fix.php?id=40097&r=notenoughinfo
Submitted twice: http://bugs.php.net/fix.php?id=40097&r=submittedtwice
register_globals: http://bugs.php.net/fix.php?id=40097&r=globals
PHP 3 support discontinued: http://bugs.php.net/fix.php?id=40097&r=php3
Daylight Savings: http://bugs.php.net/fix.php?id=40097&r=dst
IIS Stability: http://bugs.php.net/fix.php?id=40097&r=isapi
Install GNU Sed: http://bugs.php.net/fix.php?id=40097&r=gnused
Floating point limitations: http://bugs.php.net/fix.php?id=40097&r=float
No Zend Extensions: http://bugs.php.net/fix.php?id=40097&r=nozend
MySQL Configuration Error: http://bugs.php.net/fix.php?id=40097&r=mysqlcfg