|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
[2001-11-19 05:46 UTC] lenar at vision dot ee
Hi, During development i felt great need for function that could be named sprintf_array() That is ordinary sprintf() which would be able to take arguments from array: string sprintf_array(string format, array args) What do you think? Lenar PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Wed Nov 05 16:00:01 2025 UTC |
Why not just build your own function? function sprintf_array ($format) { if (1 == func_get_args () ) { return sprintf ($format); } $argv = func_get_args (); return call_user_func_array ('sprintf', $argv); } (Not tested, but something like this should work. :)