Rãspuns: [PHP] Array Question
| From: | Ovidiu EFTIMIE | Date: | Fri, 20 Oct 2000 12:33:27 +0000 |
| Subject: | Rãspuns: [PHP] Array Question | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-21368@lists.php.net to get a copy of this message | ||
Hi Brian,
try this function
function returnUnique($A,$B){
settype($A,"array");reset($A);
settype($B,"array");reset($B);
settype($aux,"array");
while(list(,$value)=each($A)){
if(!in_array($value,$B)){
array_unshift($aux,$value);
}
}
$ses=array_merge($B,$aux);
return $ses;
}
Ovidiu
-----Mesaj original-----
De la: php-general-return-21238-eovidiu=rds.ro@lists.php.net
[mailto:php-general-return-21238-eovidiu=rds.ro@lists.php.net]În numele
Brian B.
Trimis: Thursday, October 19, 2000 9:18 PM
Catre: php-general@lists.php.net
Subiect: [PHP] Array Question
I have two databases, each database in on a different server. I want to do
two queries
one to each database and then pull the results of the two queries into 1 big
array and
then sort the array by datetime field and then display the results. I want
to do this
so I don't have results looking like
Oct 12
Oct 11
Oct 10
Oct 12
Oct 11
Oct 10
So that way I can pull all the results I need together and then sort all of
them so both
results from both show as 1 big array. What do I need to do in order to get
this to work?
Any help with code would be greatly appreciated.
/'^'\
( o o )
------------------------------------------oOOO--(_)--OOOo----
Brian Budnick
ArosNet Systems Administration .oooO
EMail: dreamboy@aros.net ( ) Oooo.
--------------------------------------------\ (----( )-----
\_) ) /
(_/
--
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