Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- function merge2arr($arrkey, $arrval)
- {
- /*use the fuction to create a new array using the fist
- for keys and the second it is values */
- $arrnew = array_combine($arrkey, $arrval);
- var_export ($arrnew);
- }
- $keys = array('red', 'yellow' , 'blue');
- $values = array('rojo', 'amarillo', 'azul');
- // call the function merge2arr
- merge2arr($keys , $values);
- ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement