Why not use included variables?

vlad0000

New Member
This is a rather basic question from a total php newbie so please be patient...Why do most of the tutorials on php site maintenance tell you to use php includes but do not mention using variables?Is there for example something wrong with this one:\[code\]<title><?php include 'includes/meta.php';echo "$title_index";?></title><meta name="description" content=<?php include 'includes/meta.php';echo "$desc_index";?>>\[/code\]... if compared to this one:\[code\]<title><?php include 'includes/sitename.php';?></title><meta name="description" content=<?php include 'includes/description.php';>\[/code\]?In this particular case wouldn't it be easier to have all the SEO-relevant meta tag content in one file instead of spreading them or parts of them in separate files? So back to the main point: is there some reason to avoid using a "master file" and thus spreading the included content into multiple files that are included in their totality here and there? Or have I just read the wrong articles?
 
Back
Top