开发者

php error with post inside variable

开发者 https://www.devze.com 2022-12-30 20:09 出处:网络
Trying to do this: $product_description =\'Credit balance of €\' $_POST[\'creditamount\'] ; Want to display that post inside my variable but get this

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

精彩评论

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