♦ Easyboy (¥ 21188 NU) Star:Ultimate Created Topics: 2107 Replies: 39 |
Posted on: 03:19 Wed, 12 Mar 2014
This tutorial will guide you on how to echo PHP variables together with HTML codes.
Lets assume you have set a PHP variable like the one below
Now if you want to echo it, all you need do is use $author and it will output the variable "Kunlessi".
Here's the codebr />
Article Posted by .
Here's the output
Article Posted by Inyavic.
Easy isn't it?
Now, for you to echo the variable together with HTML codes, you don't just use $author 'cos it won't work rather use it this way: ' .$author. ' (Note: There's a space between ' and .)
Here's the codebr /> $author = 'Kunlessi';
echo '
?>
Here's the outputbr
This tutorial will guide you on how to echo PHP variables together with HTML codes.
Lets assume you have set a PHP variable like the one below
Now if you want to echo it, all you need do is use $author and it will output the variable "Kunlessi".
Here's the codebr />
Article Posted by .
Here's the output
Article Posted by Inyavic.
Easy isn't it?
Now, for you to echo the variable together with HTML codes, you don't just use $author 'cos it won't work rather use it this way: ' .$author. ' (Note: There's a space between ' and .)
Here's the codebr /> $author = 'Kunlessi';
echo '
Article Posted by ' .$author. '.
';?>
Here's the outputbr
Article Posted by Kunlessi.