开发者

php error with post inside variable

Trying to do this:

$product_description =  'Credit balance of €' $_POST['creditamount'] ;

Want to display that post inside my variable but get this

Parse 开发者_运维技巧error: syntax error, unexpected T_VARIABLE in /var/www/account/credits/moneybookers/process.php on line 48

What am i doing wrong??


You are missing the concatenation operator .

Your code should look like this:

$product_description = 'Credit balance of €' . $_POST['creditamount'];


You miss a dot behind 'Credit balance of €'.

In PHP, you join strings using .. Ex.:

$new_string = $string_one . "whatever" . $string_two;
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜