我在PHP中使用sprintf()
,但它在頁面上什麼都不顯示。爲什麼sprintf()在這種情況下工作?
下面是我在做什麼:
$lang['request_paragraph']="Please check your email for a message from %s (%s). This message contains instructions for initiating the issuance of a new password for your participant number. If you did not receive the email message from %s within 10-15 minutes, please make sure that your email provider does not have a spam filter that is blocking our email from reaching your Inbox. You will not be able to receive email from us if your email provider is using a mail-blocking device. Click on the button below to send the validation email again if it appears to have been blocked or never received. You will only be able to re-send the validation email 3 more times.";
$company="Company Name";
$admin_email="[email protected]";
sprintf($lang['request_paragraph'],$company,$admin_email,$company);
每個單獨的字符串顯示中做正確的回聲每個字符串,所以我究竟做錯了什麼?
我需要使用sprintf()
,因爲我正在處理語言文件,它使得它比在語言定義中將段落分割成塊更加簡單。
哪裏的代碼顯示的東西:
將被替換? – 2012-03-27 10:23:09