Email Notification for each course enrollment

Re: Email Notification for each course enrollment

by Guido Hornig -
Number of replies: 0
Picture of Plugin developers

try:

$body = "You have been enrolled to course. ".$course->fullname." <br/><br/> Please login to start your course. <br/><br/> <a href =\"$courselink\">click here to go to the course...</a><br/><br/>Thanks.<br/>Admin";

1)

In PHP $name will be substituted in double quotes.  Not in single quotes

$name ="Miller";

echo "Tom $name";

:> Tom Miller

echo 'Tom $name';

:> Tom $name

2)

all the HTML, like <br> is just string content like letters a...z

echo "<h1> text</h1>";

:>

text


but when you want to print a " (double quotes)  than you need a so called escape character before. the excape character is the backslash in PHP 

echo "\"";

:> "

echo "\";

Syntax error

echo ' this is a double quote " ' ;

:> this is a double quote "

(please rate me,  if it helps)

Guido

from lern.link