Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我在 mysql 中有以下模板字符串,我通过 php 获取。
$msg = "亲爱的 $contacts-salutation$ $contacts-firstname$ $contacts-lastname$,祝你生日快乐!!最好的问候,团队";
我想用其他 mysql 表中存在的变量替换 $contacts- _ _ $ 。但我不能代替它?
如何替换字符串中的字符串?
尝试使用
${联系人}-dadasdsdasd