code at first step change something for work with intesection

This is a discussion on code at first step change something for work with intesection within the alt.comp.lang.php forums, part of the PHP Programming Forums category; inner $arraytot I have more subarray that I can merge two a two with cicle: $result = array(); foreach($arraytot as $...


Go Back   Usenet Forums > PHP Programming Forums > alt.comp.lang.php

FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #1 (permalink)  
Old 07-04-2007
artev
 
Posts: n/a
Default code at first step change something for work with intesection

inner $arraytot I have more subarray that I can merge two a two with cicle:

$result = array();
foreach($arraytot as $value) {
$result = array_merge($result, $value);
}

but if I use array_intersect not work;
this because I think at first iteration it does an intersection between
$result that is a empty array and the 1st subarray, so the result is a void
array and for the next iteration it will have always an intersection with a
void array and the subarray;
Reply With Quote
Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are Off
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



All times are GMT +1. The time now is 02:00 AM.


Powered by vBulletin® Version 3.7.3
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO 3.0.0