我在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