Jump to content

Recommended Posts

Hey there guys.

 

I am trying to combine two or more arrays based on values that match within those arrays.

 

Here is an example of the array I am working with:

 

    [5] => Array
        (
            [id] => 207
            [session_id] => 6589
            [conference] => 198
            [title] => (206) Studies of Threading Successes in Popular PC Games and Engines
            [format] => Tutorial
            [type] => 3
            [overview] => Half-day tutorial, repeated in morning and after lunch. In this follow-up to 2007's popular Threading Games for Performance tutorial, Paul Lindberg and Brad Werth will present detailed case studies of successful threading practices in modern PC games. Each case study will be bookended by an explanation of the theory and a "what if" discussion of alternative approaches and further improvements. In addition to detail on specific games, major PC engines will be covered -- maybe the one you are planning to use in your next game.
            [file_name] => o1/vault/gdc08/slides/S6589i3.ppt
            [ftp_url] => ftp://cmpmedia.vo.llnwd.net/o1/vault/gdc08/slides/S6589i3.ppt
            [http_url] => http://cmpmedia.vo.llnwd.net/o1/vault/gdc08/slides/S6589i3.ppt
            [featured] => 0
            [free] => 0
            [homepage] => 
            [image] => 
            [speakers] => Array
                (
                    [0] => Array
                        (
                            [id] => 285
                            [cmpevents_id] => 442854
                            [link] => https://www.cmpevents.com/GD08/a.asp?option=G&V=3&id=442854
                            [first_name] => Paul
                            [last_name] => Lindberg
                            [job_title] => Senior Software Engineer
                            [company] => Intel
                        )

                    [1] => Array
                        (
                            [id] => 254
                            [cmpevents_id] => 550518
                            [link] => https://www.cmpevents.com/GD08/a.asp?option=G&V=3&id=550518
                            [first_name] => Brad
                            [last_name] => Werth
                            [job_title] => Senior Software Engineer
                            [company] => Intel
                        )

                )

            [sort_by_speaker] => Paul Lindberg
            [sort_by_company] => Intel
            [tracks] => Array
                (
                    [0] => Array
                        (
                            [id] => 23
                            [name] => Programming
                            [conference] => 198
                        )

                )

            [tracks_display] => Programming
            [type_data] => Array
                (
                    [id] => 3
                    [name] => Slides
                    [icon_url] => /vault/images/icon_slideshow.gif
                )

            [rating] => Array
                (
                    [class] => rating nostar
                )

        )

    [6] => Array
        (
            [id] => 208
            [session_id] => 6589
            [conference] => 198
            [title] => (206) Studies of Threading Successes in Popular PC Games and Engines
            [format] => Tutorial
            [type] => 3
            [overview] => Half-day tutorial, repeated in morning and after lunch. In this follow-up to 2007's popular Threading Games for Performance tutorial, Paul Lindberg and Brad Werth will present detailed case studies of successful threading practices in modern PC games. Each case study will be bookended by an explanation of the theory and a "what if" discussion of alternative approaches and further improvements. In addition to detail on specific games, major PC engines will be covered -- maybe the one you are planning to use in your next game.
            [file_name] => o1/vault/gdc08/slides/S6589i4.ppt
            [ftp_url] => ftp://cmpmedia.vo.llnwd.net/o1/vault/gdc08/slides/S6589i4.ppt
            [http_url] => http://cmpmedia.vo.llnwd.net/o1/vault/gdc08/slides/S6589i4.ppt
            [featured] => 0
            [free] => 0
            [homepage] => 
            [image] => 
            [speakers] => Array
                (
                    [0] => Array
                        (
                            [id] => 285
                            [cmpevents_id] => 442854
                            [link] => https://www.cmpevents.com/GD08/a.asp?option=G&V=3&id=442854
                            [first_name] => Paul
                            [last_name] => Lindberg
                            [job_title] => Senior Software Engineer
                            [company] => Intel
                        )

                    [1] => Array
                        (
                            [id] => 254
                            [cmpevents_id] => 550518
                            [link] => https://www.cmpevents.com/GD08/a.asp?option=G&V=3&id=550518
                            [first_name] => Brad
                            [last_name] => Werth
                            [job_title] => Senior Software Engineer
                            [company] => Intel
                        )

                )

            [sort_by_speaker] => Paul Lindberg
            [sort_by_company] => Intel
            [tracks] => Array
                (
                    [0] => Array
                        (
                            [id] => 23
                            [name] => Programming
                            [conference] => 198
                        )

                )

            [tracks_display] => Programming
            [type_data] => Array
                (
                    [id] => 3
                    [name] => Slides
                    [icon_url] => /vault/images/icon_slideshow.gif
                )

            [rating] => Array
                (
                    [class] => rating nostar
                )

        )

 

Alright, so, here is what needs to happen.

 

If Array #5 and #6 have the the same session_id and type, I need the file_name, ftp_url, and http_url of Array #6 to be appended to Array #5.  All of the values within the arrays are the same minus the file_name, ftp_url, and http_url.

 

Also, please know that their could be 4-5 matching arrays all with the same session_id and type and they would all need to be merged into *1* entry with their respective file_name, ftp_url, and http_url.

 

Any ideas on how to do this?

Not exactly clear on the question, but this might help you get rolling. Also note that this gets insanely long depending on how many arrays you have.

 

<?php
// takes in multi dimm array
function combineArrays($arrays) {
     $newarray = array();
     $cnt = count($arrays);
     for ($i=0; $i < $cnt; $i++) {
           $array = $arrays[$i];
           foreach ($arrays as $nextArray) {
                  $newarray[] = compareArray($array, $nextArray);
           }
           unset($arrays[$i]); // unset cause we know this one does not compare;
    }

    return $newarray;
}

function compareArray($array1, $array2) {
     if ($array1['sessionid'] == $array2['session_id'] && $array1['type'] == $array2['type']) {
             $array1['ftp_url2'] = $array2['ftp_url'];
             // etc
              return $array1;
     }
     return false; // not compatible
}
?>

 

That code could easily be fine tuned but my mind is not into now, hopefully that gets you going on what you need. The ultimate result is a returned array of the combined values...I think.

Not exactly clear on the question, but this might help you get rolling. Also note that this gets insanely long depending on how many arrays you have.

 

<?php
// takes in multi dimm array
function combineArrays($arrays) {
     $newarray = array();
     $cnt = count($arrays);
     for ($i=0; $i < $cnt; $i++) {
           $array = $arrays[$i];
           foreach ($arrays as $nextArray) {
                  $newarray[] = compareArray($array, $nextArray);
           }
           unset($arrays[$i]); // unset cause we know this one does not compare;
    }

    return $newarray;
}

function compareArray($array1, $array2) {
     if ($array1['sessionid'] == $array2['session_id'] && $array1['type'] == $array2['type']) {
             $array1['ftp_url2'] = $array2['ftp_url'];
             // etc
              return $array1;
     }
     return false; // not compatible
}
?>

 

That code could easily be fine tuned but my mind is not into now, hopefully that gets you going on what you need. The ultimate result is a returned array of the combined values...I think.

 

That is precisely what I am looking for.  At the moment, I am attempting to fine tune it as I am getting some very odd data returns.  I am getting 1 array with 592 blank elements :)

Yea, like I said it was more of psuedo code (layout/design) instead of a working example. At least you now have the idea to go off of.

 

I know where the blanks are coming form anyhow =)

 

<?php
// takes in multi dimm array
function combineArrays($arrays) {
     $newarray = array();
     $cnt = count($arrays);
     for ($i=0; $i < $cnt; $i++) {
           $array = $arrays[$i];
           foreach ($arrays as $nextArray) {
                  $compared = compareArray($array, $nextArray);
                  if (is_array($compared)) 
                        $newarray[] = $compared;
           }
           unset($arrays[$i]); // unset cause we know this one does not compare;
    }

    return $newarray;
}

 

That should narrow your results =)

Alright I got it VERY close to what I want.  Just have one issue.

 

function combineArrays($arrays) {
$newarray = array();
$cnt = count($arrays);
for ($i=0; $i < $cnt; $i++) {
	$array = $arrays[$i];

	$comparison_found = false;
	$exists_in_array = false;

	foreach ($arrays as $nextArray) {

		foreach($newarray as $storedarray)
		{	
			if(strpos($storedarray['id'], $nextArray['id']))
			{
				$exists_in_array = true;
			}
		}

		if(!$exists_in_array)
		{
			if($comparison_found == true)
			{
				$match_existing_array = end($newarray);
				$compared_array = compareArray($match_existing_array, $nextArray);
				if($compared_array)
				{
					$value_holder = array_pop($newarray);
					array_push($newarray, $compared_array);
				}

			}
			else
			{
				$compared_array = compareArray($array, $nextArray);
				if (is_array($compared_array))
				{
					$newarray[] = $compared_array;

					$comparison_found = true; 
				}	
				else
				{
					$comparison_found = false;
				}
			}
		}
	}

	if($comparison_found == false || $exists_in_array == false)
	{
		$newarray[] = $array;
	}

	unset($arrays[$i]);
    }
    return $newarray;
}

function compareArray($array1, $array2) {
if ($array1['session_id'] == $array2['session_id'] && $array1['type'] == $array2['type'] && 
			$array1['id'] != $array2['id']) {	
     		
     			$array1['id'] = $array1['id'].", ".$array2['id'];
     			$array1['file_name'] = $array1['file_name'].", ".$array2['file_name'];
    			$array1['ftp_url'] = $array1['ftp_url'].", ".$array2['ftp_url'];
     			$array1['http_url'] = $array1['http_url'].", ".$array2['http_url'];
     			$array1['rating']['class'] = $array1['rating']['class'].", ".$array2['rating']['class'];
     			
     			return $array1;
     		}
     		return $false;
}

 

The problem I am having now is that I cannot get the duplicate entries to go away.

 

Here is what is coming out:

 

    [0] => Array
        (
            [id] => 183
            [session_id] => 6152
            [conference] => 198
            [title] => (103) Advanced Visual Effects with Direct3D
            [format] => Tutorial
            [type] => 3
            [overview] => This day long tutorial, brought to you by the industry's leading hardware vendors and game developers, provides an in-depth look into the new technologies in Direct3D 10 and how they can be applied to creating cutting edge game graphics.
            [file_name] => o1/vault/gdc08/slides/S6152i1.pdf
            [ftp_url] => ftp://cmpmedia.vo.llnwd.net/o1/vault/gdc08/slides/S6152i1.pdf
            [http_url] => http://cmpmedia.vo.llnwd.net/o1/vault/gdc08/slides/S6152i1.pdf
            [featured] => 0
            [free] => 0
            [homepage] => 
            [image] => 
            [speakers] => Array
                (
                    [0] => Array
                        (
                            [id] => 409
                            [cmpevents_id] => 
                            [link] => https://www.cmpevents.com/GD08/a.asp?option=G&V=3&id=581051
                            [first_name] => Andrei
                            [last_name] => Tatarinov
                            [job_title] => 
                            [company] => NVIDIA
                        )

                    [1] => Array
                        (
                            [id] => 408
                            [cmpevents_id] => 
                            [link] => https://www.cmpevents.com/GD08/a.asp?option=G&V=3&id=579408
                            [first_name] => Holger
                            [last_name] => Gruen
                            [job_title] => Developer Relations Engineer
                            [company] => AMD GmbH
                        )

                    [2] => Array
                        (
                            [id] => 407
                            [cmpevents_id] => 
                            [link] => https://www.cmpevents.com/GD08/a.asp?option=G&V=3&id=572441
                            [first_name] => Louis
                            [last_name] => Bavoil
                            [job_title] => Developer Technology Engineer
                            [company] => NVIDIA
                        )

                    [3] => Array
                        (
                            [id] => 406
                            [cmpevents_id] => 
                            [link] => https://www.cmpevents.com/GD08/a.asp?option=G&V=3&id=563332
                            [first_name] => Ignacio
                            [last_name] => Llamas
                            [job_title] => Software Engineer
                            [company] => NVIDIA
                        )

                    [4] => Array
                        (
                            [id] => 405
                            [cmpevents_id] => 
                            [link] => https://www.cmpevents.com/GD08/a.asp?option=G&V=3&id=562990
                            [first_name] => Cem
                            [last_name] => Cebenoyan
                            [job_title] => Manager, Developer Technology
                            [company] => NVIDIA
                        )

                    [5] => Array
                        (
                            [id] => 404
                            [cmpevents_id] => 
                            [link] => https://www.cmpevents.com/GD08/a.asp?option=G&V=3&id=517980
                            [first_name] => Chas
                            [last_name] => Boyd
                            [job_title] => 
                            [company] => Microsoft
                        )

                    [6] => Array
                        (
                            [id] => 403
                            [cmpevents_id] => 
                            [link] => https://www.cmpevents.com/GD08/a.asp?option=G&V=3&id=475559
                            [first_name] => Nicolas
                            [last_name] => Thibieroz
                            [job_title] => European Developer Relations
                            [company] => AMD
                        )

                    [7] => Array
                        (
                            [id] => 402
                            [cmpevents_id] => 
                            [link] => https://www.cmpevents.com/GD08/a.asp?option=G&V=3&id=444218
                            [first_name] => Richard
                            [last_name] => Huddy
                            [job_title] => Developer Relations Manager
                            [company] => AMD
                        )

                    [8] => Array
                        (
                            [id] => 401
                            [cmpevents_id] => 
                            [link] => https://www.cmpevents.com/GD08/a.asp?option=G&V=3&id=228125
                            [first_name] => Natalya
                            [last_name] => Tatarchuk
                            [job_title] => Staff Demo Engineer
                            [company] => AMD
                        )

                    [9] => Array
                        (
                            [id] => 400
                            [cmpevents_id] => 
                            [link] => https://www.cmpevents.com/GD08/a.asp?option=G&V=3&id=92372
                            [first_name] => Alex
                            [last_name] => Vlachos
                            [job_title] => Graphics Programmer
                            [company] => Valve
                        )

                )

            [sort_by_speaker] => Andrei Tatarinov
            [sort_by_company] => NVIDIA
            [tracks] => Array
                (
                    [0] => Array
                        (
                            [id] => 23
                            [name] => Programming
                            [conference] => 198
                        )

                )

            [tracks_display] => Programming
            [type_data] => Array
                (
                    [id] => 3
                    [name] => Slides
                    [icon_url] => /vault/images/icon_slideshow.gif
                )

            [rating] => Array
                (
                    [class] => rating nostar
                )

        )

    [1] => Array
        (
            [id] => 180, 179
            [session_id] => 6526
            [conference] => 198
            [title] => (205) Normal Mapping Industry Survey
            [format] => Tutorial
            [type] => 3
            [overview] => This session will provide a broad survey of the methods, tools and process for generating Normal Map Data. Attendees will learn the process for generating high resolution models using such tools as Mudbox and Zbrush, the process for applying the maps in major 3d packages and how these packages work with normal maps, and we'll peak into the other various methods used on projects to generate normal maps without the use of high resolution assets. All materials in the class will be presented by a number of industry leading speakers experienced in the process.
            [file_name] => o1/vault/gdc08/slides/S6526i2.pdf, o1/vault/gdc08/slides/S6526i1.pdf
            [ftp_url] => ftp://cmpmedia.vo.llnwd.net/o1/vault/gdc08/slides/S6526i2.pdf, ftp://cmpmedia.vo.llnwd.net/o1/vault/gdc08/slides/S6526i1.pdf
            [http_url] => http://cmpmedia.vo.llnwd.net/o1/vault/gdc08/slides/S6526i2.pdf, http://cmpmedia.vo.llnwd.net/o1/vault/gdc08/slides/S6526i1.pdf
            [featured] => 0
            [free] => 0
            [homepage] => 
            [image] => 
            [speakers] => Array
                (
                    [0] => Array
                        (
                            [id] => 397
                            [cmpevents_id] => 
                            [link] => https://www.cmpevents.com/GD08/a.asp?option=G&V=3&id=586066
                            [first_name] => Alex
                            [last_name] => Velasquez
                            [job_title] => 
                            [company] => Raven Software
                        )

                    [1] => Array
                        (
                            [id] => 396
                            [cmpevents_id] => 
                            [link] => https://www.cmpevents.com/GD08/a.asp?option=G&V=3&id=581469
                            [first_name] => Ricardo
                            [last_name] => Ariza
                            [job_title] => Character Artist
                            [company] => Naughty Dog
                        )

                    [2] => Array
                        (
                            [id] => 395
                            [cmpevents_id] => 
                            [link] => https://www.cmpevents.com/GD08/a.asp?option=G&V=3&id=573755
                            [first_name] => Scott
                            [last_name] => Spencer
                            [job_title] => Digital Art Director
                            [company] => Gentle Giant Studios
                        )

                    [3] => Array
                        (
                            [id] => 394
                            [cmpevents_id] => 
                            [link] => https://www.cmpevents.com/GD08/a.asp?option=G&V=3&id=571079
                            [first_name] => Gio
                            [last_name] => Nakpil
                            [job_title] => Artist
                            [company] => Freedom of Teach
                        )

                    [4] => Array
                        (
                            [id] => 393
                            [cmpevents_id] => 
                            [link] => https://www.cmpevents.com/GD08/a.asp?option=G&V=3&id=529524
                            [first_name] => Rich
                            [last_name] => Diamant
                            [job_title] => Lead Character Artist
                            [company] => Naughty Dog, Inc.
                        )

                    [5] => Array
                        (
                            [id] => 392
                            [cmpevents_id] => 
                            [link] => https://www.cmpevents.com/GD08/a.asp?option=G&V=3&id=524514
                            [first_name] => Adam
                            [last_name] => Myhill
                            [job_title] => Lead Technical Artist
                            [company] => Pandemic Studios
                        )

                    [6] => Array
                        (
                            [id] => 391
                            [cmpevents_id] => 
                            [link] => https://www.cmpevents.com/GD08/a.asp?option=G&V=3&id=265346
                            [first_name] => Steve
                            [last_name] => Chapman
                            [job_title] => Vice President
                            [company] => Gentle Giant Studios
                        )

                )

            [sort_by_speaker] => Alex Velasquez
            [sort_by_company] => Raven Software
            [tracks] => Array
                (
                    [0] => Array
                        (
                            [id] => 21
                            [name] => Visual Arts
                            [conference] => 198
                        )

                )

            [tracks_display] => Visual Arts
            [type_data] => Array
                (
                    [id] => 3
                    [name] => Slides
                    [icon_url] => /vault/images/icon_slideshow.gif
                )

            [rating] => Array
                (
                    [class] => rating nostar, rating nostar
                )

        )

    [2] => Array
        (
            [id] => 180
            [session_id] => 6526
            [conference] => 198
            [title] => (205) Normal Mapping Industry Survey
            [format] => Tutorial
            [type] => 3
            [overview] => This session will provide a broad survey of the methods, tools and process for generating Normal Map Data. Attendees will learn the process for generating high resolution models using such tools as Mudbox and Zbrush, the process for applying the maps in major 3d packages and how these packages work with normal maps, and we'll peak into the other various methods used on projects to generate normal maps without the use of high resolution assets. All materials in the class will be presented by a number of industry leading speakers experienced in the process.
            [file_name] => o1/vault/gdc08/slides/S6526i2.pdf
            [ftp_url] => ftp://cmpmedia.vo.llnwd.net/o1/vault/gdc08/slides/S6526i2.pdf
            [http_url] => http://cmpmedia.vo.llnwd.net/o1/vault/gdc08/slides/S6526i2.pdf
            [featured] => 0
            [free] => 0
            [homepage] => 
            [image] => 
            [speakers] => Array
                (
                    [0] => Array
                        (
                            [id] => 397
                            [cmpevents_id] => 
                            [link] => https://www.cmpevents.com/GD08/a.asp?option=G&V=3&id=586066
                            [first_name] => Alex
                            [last_name] => Velasquez
                            [job_title] => 
                            [company] => Raven Software
                        )

                    [1] => Array
                        (
                            [id] => 396
                            [cmpevents_id] => 
                            [link] => https://www.cmpevents.com/GD08/a.asp?option=G&V=3&id=581469
                            [first_name] => Ricardo
                            [last_name] => Ariza
                            [job_title] => Character Artist
                            [company] => Naughty Dog
                        )

                    [2] => Array
                        (
                            [id] => 395
                            [cmpevents_id] => 
                            [link] => https://www.cmpevents.com/GD08/a.asp?option=G&V=3&id=573755
                            [first_name] => Scott
                            [last_name] => Spencer
                            [job_title] => Digital Art Director
                            [company] => Gentle Giant Studios
                        )

                    [3] => Array
                        (
                            [id] => 394
                            [cmpevents_id] => 
                            [link] => https://www.cmpevents.com/GD08/a.asp?option=G&V=3&id=571079
                            [first_name] => Gio
                            [last_name] => Nakpil
                            [job_title] => Artist
                            [company] => Freedom of Teach
                        )

                    [4] => Array
                        (
                            [id] => 393
                            [cmpevents_id] => 
                            [link] => https://www.cmpevents.com/GD08/a.asp?option=G&V=3&id=529524
                            [first_name] => Rich
                            [last_name] => Diamant
                            [job_title] => Lead Character Artist
                            [company] => Naughty Dog, Inc.
                        )

                    [5] => Array
                        (
                            [id] => 392
                            [cmpevents_id] => 
                            [link] => https://www.cmpevents.com/GD08/a.asp?option=G&V=3&id=524514
                            [first_name] => Adam
                            [last_name] => Myhill
                            [job_title] => Lead Technical Artist
                            [company] => Pandemic Studios
                        )

                    [6] => Array
                        (
                            [id] => 391
                            [cmpevents_id] => 
                            [link] => https://www.cmpevents.com/GD08/a.asp?option=G&V=3&id=265346
                            [first_name] => Steve
                            [last_name] => Chapman
                            [job_title] => Vice President
                            [company] => Gentle Giant Studios
                        )

                )

            [sort_by_speaker] => Alex Velasquez
            [sort_by_company] => Raven Software
            [tracks] => Array
                (
                    [0] => Array
                        (
                            [id] => 21
                            [name] => Visual Arts
                            [conference] => 198
                        )

                )

            [tracks_display] => Visual Arts
            [type_data] => Array
                (
                    [id] => 3
                    [name] => Slides
                    [icon_url] => /vault/images/icon_slideshow.gif
                )

            [rating] => Array
                (
                    [class] => rating nostar
                )

        )

    [3] => Array
        (
            [id] => 179
            [session_id] => 6526
            [conference] => 198
            [title] => (205) Normal Mapping Industry Survey
            [format] => Tutorial
            [type] => 3
            [overview] => This session will provide a broad survey of the methods, tools and process for generating Normal Map Data. Attendees will learn the process for generating high resolution models using such tools as Mudbox and Zbrush, the process for applying the maps in major 3d packages and how these packages work with normal maps, and we'll peak into the other various methods used on projects to generate normal maps without the use of high resolution assets. All materials in the class will be presented by a number of industry leading speakers experienced in the process.
            [file_name] => o1/vault/gdc08/slides/S6526i1.pdf
            [ftp_url] => ftp://cmpmedia.vo.llnwd.net/o1/vault/gdc08/slides/S6526i1.pdf
            [http_url] => http://cmpmedia.vo.llnwd.net/o1/vault/gdc08/slides/S6526i1.pdf
            [featured] => 0
            [free] => 0
            [homepage] => 
            [image] => 
            [speakers] => Array
                (
                    [0] => Array
                        (
                            [id] => 397
                            [cmpevents_id] => 
                            [link] => https://www.cmpevents.com/GD08/a.asp?option=G&V=3&id=586066
                            [first_name] => Alex
                            [last_name] => Velasquez
                            [job_title] => 
                            [company] => Raven Software
                        )

                    [1] => Array
                        (
                            [id] => 396
                            [cmpevents_id] => 
                            [link] => https://www.cmpevents.com/GD08/a.asp?option=G&V=3&id=581469
                            [first_name] => Ricardo
                            [last_name] => Ariza
                            [job_title] => Character Artist
                            [company] => Naughty Dog
                        )

                    [2] => Array
                        (
                            [id] => 395
                            [cmpevents_id] => 
                            [link] => https://www.cmpevents.com/GD08/a.asp?option=G&V=3&id=573755
                            [first_name] => Scott
                            [last_name] => Spencer
                            [job_title] => Digital Art Director
                            [company] => Gentle Giant Studios
                        )

                    [3] => Array
                        (
                            [id] => 394
                            [cmpevents_id] => 
                            [link] => https://www.cmpevents.com/GD08/a.asp?option=G&V=3&id=571079
                            [first_name] => Gio
                            [last_name] => Nakpil
                            [job_title] => Artist
                            [company] => Freedom of Teach
                        )

                    [4] => Array
                        (
                            [id] => 393
                            [cmpevents_id] => 
                            [link] => https://www.cmpevents.com/GD08/a.asp?option=G&V=3&id=529524
                            [first_name] => Rich
                            [last_name] => Diamant
                            [job_title] => Lead Character Artist
                            [company] => Naughty Dog, Inc.
                        )

                    [5] => Array
                        (
                            [id] => 392
                            [cmpevents_id] => 
                            [link] => https://www.cmpevents.com/GD08/a.asp?option=G&V=3&id=524514
                            [first_name] => Adam
                            [last_name] => Myhill
                            [job_title] => Lead Technical Artist
                            [company] => Pandemic Studios
                        )

                    [6] => Array
                        (
                            [id] => 391
                            [cmpevents_id] => 
                            [link] => https://www.cmpevents.com/GD08/a.asp?option=G&V=3&id=265346
                            [first_name] => Steve
                            [last_name] => Chapman
                            [job_title] => Vice President
                            [company] => Gentle Giant Studios
                        )

                )

            [sort_by_speaker] => Alex Velasquez
            [sort_by_company] => Raven Software
            [tracks] => Array
                (
                    [0] => Array
                        (
                            [id] => 21
                            [name] => Visual Arts
                            [conference] => 198
                        )

                )

            [tracks_display] => Visual Arts
            [type_data] => Array
                (
                    [id] => 3
                    [name] => Slides
                    [icon_url] => /vault/images/icon_slideshow.gif
                )

            [rating] => Array
                (
                    [class] => rating nostar
                )

        )

 

Now because ID 179 and 180 were already used in Array #2, they should not be getting their own output like shown in Array #3 and Array #4.  If the ID 179 and 180 already exist in a previous array, then do not let them create their own arrays.

 

Any ideas?

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.