我需要一个短代码功能到我的php联系表单页面(它不是wordpress)[关闭]

i have created a contact page using php. I am sending email to the contact in database.

The database contain Name and email

when i send the email i include the [name] to my email it have to converted to the name of the email receiver.

Can anyone help me to do it

Just use string replace.

$new = str_replace('[name]', $row['name'], $emailbody); // search, replace, original

-> http://php.net/manual/en/function.str-replace.php