Passing an Array as Arguments NOT user function, in PHP -


i have following code:

$bin = "\x04\x00\xa0\x00\x04\x00\xa0\x00"; $unpack_data = unpack("c*", $bin); $arr = array($unpack_data[1], $unpack_data[2], $unpack_data[3]); 

how can pass array $arr pack() function? thing can make:

$res = pack("c*", $unpack_data[1], $unpack_data[2], $unpack_data[3]); 

but length , content of array getting in course of program.

like this:

call_user_func_array('pack', array_merge(['c*'], $unpack_data)) 

Comments

Popular posts from this blog

Python Kivy ListView: How to delete selected ListItemButton? -

asp.net mvc 4 - A specified Include path is not valid. The EntityType '' does not declare a navigation property with the name '' -