php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Request #9200 strtolower handle arrays in addition to strings
Submitted: 2001-02-09 19:29 UTC Modified: 2002-04-28 19:19 UTC
From: ben at efros dot com Assigned:
Status: Closed Package: Feature/Change Request
PHP Version: 4.0.4pl1 OS: linux
Private report: No CVE-ID: None
 [2001-02-09 19:29 UTC] ben at efros dot com
It would be nice to have strtolower() accept arrays as arguments (or just make a function such as ArrayToLower()).  For example:

$OUT["SomECapital"]="Whatever This Doesn't Matter";
echo $OUT["SomECapital"]; /* Works as expected */
$newOUT=strtolower($OUT);
/*

Currently the above line puts "Array" into $newOUT (like expected) , instead make this convert indexes with uppercase letters into lower case, so the line below would work and output the string "Whatever This Doesn't Matter"

*/
echo $newOUT["somecapital"];


Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2002-04-28 19:19 UTC] jimw@php.net
you can use array_map() to apply a function to an array like this.
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Sun May 05 04:01:32 2024 UTC