Re: array key starting with digit ending with string
| From: | Matt Matijevich | Date: | Thu, 27 May 2004 19:15:57 +0000 |
| Subject: | Re: array key starting with digit ending with string | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-187077@lists.php.net to get a copy of this message | ||
[snip]
if($data[$currentVarNameInCycle])
{
do something
}
Is there some way force the recognition of the key when it leads with
a
digit?
[/snip]
not sure I follow 100% but you could use a regular expression to
detemine if it starts with a string.
if (preg_match('/^\d/',$array_key)) {
//do something
}