s4salman Posted March 21, 2010 Share Posted March 21, 2010 I am using this code to print variable value into meta tag : <META name="keywords" content="<?php echo "$name 3gp Video"; ?>, katrina kaif, mobile videos, 3gp mobile videos, emma watson videos, aishwarya rai videos, bollywood videos"> But <?php echo "$name 3gp Video"; ?> is not printing the $name value. When i see the html source code of the web page, i only see this : <META name="keywords" content="katrina kaif, mobile videos, 3gp mobile videos, emma watson videos, aishwarya rai videos, bollywood videos"> Anyone could help me how to make this code add up $name value into meta tag. Quote Link to comment https://forums.phpfreaks.com/topic/196041-meta-tag-php-print/ Share on other sites More sharing options...
greatstar00 Posted March 21, 2010 Share Posted March 21, 2010 did u tried to use if (isset($name)) echo "yes"; else echo "no"; if (empty$name)) echo "eyes"; else echo "eno"; Quote Link to comment https://forums.phpfreaks.com/topic/196041-meta-tag-php-print/#findComment-1029718 Share on other sites More sharing options...
adamlacombe Posted March 21, 2010 Share Posted March 21, 2010 you're going to have to define $name... it looks like its not defined anywhere. lets see the rest of your source Quote Link to comment https://forums.phpfreaks.com/topic/196041-meta-tag-php-print/#findComment-1029722 Share on other sites More sharing options...
s4salman Posted March 22, 2010 Author Share Posted March 22, 2010 Ya i have defined the $name in the php file above the meta tag code. But i am still having the problem. Before the meta tag, i am successfully printing title code like this : <title><?php echo "$name 3gp Video"; ?>, Katrina Kaif, mobile videos, 3gp mobile videos, emma watson videos, aishwarya rai videos, bollywood videos</title> But i am getting problem in meta tag. Quote Link to comment https://forums.phpfreaks.com/topic/196041-meta-tag-php-print/#findComment-1029867 Share on other sites More sharing options...
Adam Posted March 22, 2010 Share Posted March 22, 2010 Can you post the code exactly as you have it? Including where you define $name.. Quote Link to comment https://forums.phpfreaks.com/topic/196041-meta-tag-php-print/#findComment-1029870 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.