Is it possible to开发者_Go百科 use array_map('vprintf', ....)?
If yes, what would be the correct syntax?
You have to provide an array of arrays (the first dimension describing the array of arguments for all elements of $arr, the second describing the values for one format string) as third argument:
<?php
$arr = array("test %s\n", "test2 %s\n");
array_map('vprintf', $arr, array(array('val1'), array('val2')));
Output:
test val1
test2 val2
精彩评论