1

I am getting a "Parse error: syntax error, unexpected 'echo' (T_ECHO)" whenever i try and echo another variable inside a variable like this:

$content=. '<p>Paragraph '.echo $variable.' here</p> ';

1 Answers1

4
$content .= '<p>Paragraph '.$variable.' here</p> ';
echo $content;

It should be like this. (.) dot should be before = and echo should not be inside the content

Chilarai
  • 1,679
  • 2
  • 8
  • 23