HTML code inside PHP code
-
Hey! I need help before I explode because of frustration.
I am using the plugin “Allow PHP in Posts and Pages” –
And I want to echo out the HTML code inside my PHP code but it doesn’t react..
I’ll give you an example:[php]$numb = 1;
switch ($numb){
case 1:
echo ‘<a href="url">Link text</a>‘;
break;
default:
echo “Something went wrong! Please contact admin!”;
}[/php]But it doesnt respond as html text – the output is just plain text: “Link text”..
How can I solve this? I tried to..
echo ‘[/php]<a href="url">Link text</a>[php]‘;
But I reed that everything needs to be within the [php]&[/php]Thank you for further help!
Viewing 2 replies - 1 through 2 (of 2 total)
Viewing 2 replies - 1 through 2 (of 2 total)
The topic ‘HTML code inside PHP code’ is closed to new replies.