Friday, 27 January 2017

image - img tag in php code

tl;dr


Replace: $lang->messagemore


With:




When you replace your PHP variable with the img tag, the HTML must still remain within the quotes of the PHP string, and thus the actual quotes for your img tag must be escaped, just as you've done for your a tag. You may also opt to use single quotes, to avoid having to escape. This should result any one of the following equivalent code snippets (I've added whitespace for readability):


Double quotes (with escaping):


$message = $message . "...
settings['bburl'] . "/" . $announcement['threadlink'] . "\">
\"\"
";

Single quotes for HTML attributes:


$message = $message . "...


";

Single quotes for PHP string:


$message = $message . '...


';

No comments:

Post a Comment

c++ - Does curly brackets matter for empty constructor?

Those brackets declare an empty, inline constructor. In that case, with them, the constructor does exist, it merely does nothing more than t...