I am a new learner software in PHP, so I try to do "button on click" in PHP with the object and I get the error message: " syntax error, unexpected '"'>"' (T_CONSTANT_ENCAPSED_STRING) "
this is my line of code:
$text .="<button onclick=alert"('" .$name. "\nIs Awesome!')"'>" . $name. "</button>";
Thank for help!