SORU
8 EYLÜL 2010, ÇARŞAMBA


Kaçan %PHP sprintf

Aşağıdaki çıktıyı istiyorum:-

İndirim hakkında from € 27.59 P-Üst hesap.

böyle bir şey yaptığımda:-

$variablesArray[0] = '€';
$variablesArray[1] = 27.59;
$stringWithVariables = 'About to deduct 50% of %s %s from your Top-Up account.';
echo vsprintf($stringWithVariables, $variablesArray);

Ama 50% ya da değiştirilmesi % düşündüğü için bana bu hata vsprintf() [function.vsprintf]: Too few arguments in ... verir. Nasıl kurtulurum?

CEVAP
8 EYLÜL 2010, ÇARŞAMBA


%: başka bir ile kaçmak

$stringWithVariables = 'About to deduct 50%% of %s %s from your Top-Up account.';

Bunu Paylaş:
  • Google+
  • E-Posta
Etiketler:

YORUMLAR

SPONSOR VİDEO

Rastgele Yazarlar

  • isupportthegosselins

    isupporttheg

    6 Aralık 2009
  • justintimberlakeVEVO

    justintimber

    2 EYLÜL 2009
  • Shylo Sharity

    Shylo Sharit

    27 EKİM 2011