Re: Q: array intersection problem

From: Date: Wed, 15 Aug 2001 00:25:58 +0000
Subject: Re: Q: array intersection problem
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-62719@lists.php.net to get a copy of this message
Hi, play with array_intersect or array_diff and some other array functions. http://www.php.net/manual/en/function.array-intersect.php (PHP 4 >= 4.0.1) http://www.php.net/manual/en/function.array-diff.php (PHP 4 >= 4.0.1) ----- Original Message ----- From: "Joe Rice" <jrice@bigidea.com> To: <php-general@lists.php.net> Sent: 2001. augusztus 14. 19:57 Subject: [PHP] Q: array intersection problem > hi, > > i have two arrays that i would like > to find the intersection and at > this intersection alter the value. > > $invalid = array("1","3","9"); > $questions = > array("1","2","3","4","5","6","7","8","9"); > > and i would like the result to be an new array that looks > like this: > > $new_questions = array("<font color=red>1</font>", > "2", > "<font color=red>3</font>", > "4","5","6","7","8", > "<font color=red>4</font>"); > > thank you in advance, > joe > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, e-mail: php-general-unsubscribe@lists.php.net > For additional commands, e-mail: php-general-help@lists.php.net > To contact the list administrators, e-mail: php-list-admin@lists.php.net >

« previous php.general (#62719) next »