Jump to content

array_combine


craygo

Recommended Posts

a very simple function to combine:

[code]
<?php

function ericsCombine($a1, $a2){
    $output = array();
    foreach($a1 as $key => $value){
        $output[$value] = $a2[$key];
    }
    return $output;
}

?>
[/code]

or something like that...

You can work a little more on this function, it can get better...
Link to comment
https://forums.phpfreaks.com/topic/21535-array_combine/#findComment-96110
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • 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.