Reply to strange problem on preg_grep

Your name:

Reply:


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

[Back to original message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация