|
Posted by Marco Favero on 09/13/07 08:11
Hello all,
if I write this:
<?php
$arraymulti['test'][0]= 'testing';
print 'Value: '.$arraymulti['test'][0]."\n";
$list = preg_grep("/what/",$arraymulti);
print 'Value: '.$arraymulti['test'][0];
?>
then the output is:
Value: testing
Value: A
It seems that preg_grep alter the value of array!
Can you reproduce this behaviour?
Any hint?
Thank you very much
My php is:
php -v
PHP 5.2.3 (cli) (built: Jul 24 2007 13:54:29)
Copyright (c) 1997-2007 The PHP Group
Zend Engine v2.2.0, Copyright (c) 1998-2007 Zend Technologies
with Zend Extension Manager v1.2.0, Copyright (c) 2003-2007, by
Zend Technologies
with Zend Optimizer v3.3.0, Copyright (c) 1998-2007, by Zend
Technologies
The system is
Apache/1.3.37 (Unix) PHP/5.2.3 mod_ssl/2.8.28 OpenSSL/0.9.8e
--
Marco
Navigation:
[Reply to this message]
|