PX : code

array_merge_assoc by Markus Diersbock
Rating: 5.00
Download this code


<?php

/*
    Name:         array_merge_assoc
    Author:     Markus Diersbock
    Details:     Takes two related indexed arrays and
            combines them into one associative array.

    Revisions:    2003/12/13 - Created
*/

function array_merge_assoc($keyarray$valuearray){
    
$i=0;

    foreach(
$keyarray as $element){
        
$aryreturn[$element]=$valuearray[$i++];
    }

    return 
$aryreturn;
}
?>


Comments or questions?
PX is running PHP 5.2.17
Thanks to Miranda Productions for hosting and bandwidth.
Use of any code from PX is at your own risk.