how to display site name (Tagline) in title, using php?

  php, title

Im trying to display the website tagline on the pages but it doesnt work, my code is like this:

CONFIG.PHP FILE:

”’

define(‘EMAIL’,’[email protected]’);

define(‘INFO_EMAIL’, ’[email protected]’);

define(‘PHONE’, ‘+xx xxx xxx xx’);

define(‘PHONE2’, ‘+xx xxx xxx xx’);

define(‘ADDRESS’, ‘ xxx xxx xxx ‘);

define("SITE", "https://www.exemple.com/");

define(‘TITLE’, ‘My Tagline’);

define("TMPL_PATH", SITE."assets");

”’

My HTML code:

”’ Website Title – ?echo $title;?”’

The results I want:
Website Title – My Tagline

Source: Ask PHP

LEAVE A COMMENT