Code Php的语法错误

时间:2013-10-14 03:50:56

标签: php

我不断用这行代码获得此语法错误。

$subject = 'Message - General Inquiry from '.$field_name' with the email of '.$field_email;

有人可以帮忙吗?

2 个答案:

答案 0 :(得分:4)

$subject = 'Message - General Inquiry from '.$field_name.' with the email of '.$field_email;

答案 1 :(得分:1)

.之后您错过了$field_name运算符。另一方面,如果您只使用插值,则无需担心.运算符:

$subject = "Message - General Inquiry from $field_name with the email of $field_email";