|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2001-07-25 16:31 UTC] venaas@php.net
[2001-07-26 03:35 UTC] caugustin at alcyonis dot fr
[2001-07-27 21:44 UTC] sniper@php.net
[2001-09-14 19:15 UTC] jeroen@php.net
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Wed Nov 05 16:00:01 2025 UTC |
Example of script <? echo "<html><body>\r\n"; echo "<h1>Simple array : it works</h1>\r\n<pre>\r\n"; $array1 = array('a1' => 'toto', 'b1' => 'titi', 'b2' => 'tutu', 'b3' => 'rien', 'c1' => 'zone'); $array2 = array('a2' => 'adeux', 'b5' => 'titi'); var_dump(array_diff($array1, $array2)); echo "\r\n</pre>\r\n<hr>\r\n<h1>Array of array : it doesn't work</h1>\r\n<pre>\r\n"; $array1 = array( array('a1' => 'toto', 'b1' => 'titi', 'b2' => 'tutu', 'b3' => 'rien', 'c1' => 'zone'), array('a2' => 'adeux', 'b5' => 'titi'), array('a8' => 'ahuit', 'b12' => 'avion') ); $array2 = array( array('a2' => 'adeux', 'b5' => 'titi'), array('a7' => 'asept', 'c5' => 'camion') ); var_dump(array_diff($array1, $array2)); echo "\r\n</pre></body></html>\r\n"; ?> Command line './configure' '--with-apache=../apache' '--with-zlib' '--with-bzip2' '--enable-calendar' '--with-cybermut=../cybermut' '--enable-ftp' '--with-gd=../gd' '--with-pgsql=/usr/local/psql' '--with-mysql' '--with-sablot' '--with-xml' Comment I use array_diff with array of array comming from database since version 4.0.1 without any trouble. We just migrate to version 4.0.6 tree days ago with apache 1.3.20. Congratulation for PHP. I love it :o)