For creating dynamic title tags,
I tried using
<title>welcome<?php echo '$pagetitle';?></title> </head> <body> : : <?php : $pagetitle = '$row'; ?> //closing rest of the tags.
I get nothing displayed on title ! So i changed the code to,
<html> <head> </head> <body> : : : : : <?php : : : $pagetitle = '$row'; <title>welcome<?php echo '$pagetitle';?></title> ?> //closing rest of the tags.
Its now working. But is this the right way to use title tags in the middle of the code somewhere but not in the actuall <head> section of the page?!
Also, I tried using <meta> tags tooo randomly in the middle of the page code.
Though everything is working fine, i doubt i am actually coding in the wrong way. Is this the proper way to code? I chose this because the first version is displaying me nothing as $pagetitle gets value into it after empty title is displayed:(
Any advise will be appreciated. Thank you all in advance.