php3-list | 200003
Date: 03/31/00
- Next message: Mohamed AMTOUN: "[PHP3] Re: [[PHP3] SMS]"
- Previous message: TV Karthick Kumar: "[PHP3] Images"
- Next in thread: NickM: "Re: [PHP3] Variable substitution in sprintf() format string ?!"
- Reply: NickM: "Re: [PHP3] Variable substitution in sprintf() format string ?!"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Take a look the following code. I am trying to use a variable
as format string for sprintf(). The string itsself contains
some other variable that should be replaced within the sprintf()
call however I are not replaced. I tried a lot with escaping $
and quoting but without result. Maybe someone can help.
<?
$row = Array();
$row["x"] = "teststring: ";
$dummy = "also a test";
$s = '$row["x"]/%s';
$s1 = '$dummy/%s';
echo sprintf("$s\n",'blabla');
echo sprintf("$s1\n",'blabla');
?>
Thanks,
Andreas
-- PHP 3 Mailing List <http://www.php.net/> To unsubscribe, send an empty message to php3-unsubscribe <email protected> To subscribe to the digest, e-mail: php3-digest-subscribe <email protected> To search the mailing list archive, go to: http://www.php.net/mailsearch.php3 To contact the list administrators, e-mail: php-list-admin <email protected>
- Next message: Mohamed AMTOUN: "[PHP3] Re: [[PHP3] SMS]"
- Previous message: TV Karthick Kumar: "[PHP3] Images"
- Next in thread: NickM: "Re: [PHP3] Variable substitution in sprintf() format string ?!"
- Reply: NickM: "Re: [PHP3] Variable substitution in sprintf() format string ?!"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]

