faqts : Computers : Programming : Languages : PHP : Common Problems : Variables

+ Search
Add Entry AlertManage Folder Edit Entry Add page to http://del.icio.us/
Did You Find This Entry Useful?

1 of 1 people (100%) answered Yes
Recently 1 of 1 people (100%) answered Yes

Entry

Where can I find some detailed information on the use of such variables as %s ?

Dec 2nd, 2004 12:19
Philip Olson, Jim Parker,


Most likely you're referring to printf or sprintf, see the PHP manual 
for details:

  http://php.net/sprintf

For example:

  $var = 'hello';
  $text = sprintf('I said %s', $var);

  echo $text; // I said hello