[thelist] sprintf (WAS: MySQL/PHP Associative Array Insert)

Howard Cheng howcheng at ix.netcom.com
Mon Feb 3 12:09:02 CST 2003


I've been doing PHP for a number of years and many people seem to really
like using sprintf(), but I can't see why. What are the advantages of using
printf() and sprintf() over just plain old echo or print?

At 01:26 PM 2/1/2003 -0800, Mike Migurski wrote:
>$str = sprintf('here are some values of an associative array: %s, %s, %s',
>                 $assocArr['one'],
>                 $assocArr['foo'],
>                 $assocArr['bar']);

::::::::::::::::::::::::::::::::::
Howard Cheng
http://www.howcheng.com/
howcheng at ix dot netcom dot com
AIM: bennyphoebe
ICQ: 47319315




More information about the thelist mailing list