U
U
Uilenrok2015-11-06 23:42:51
PHP
Uilenrok, 2015-11-06 23:42:51

html code in php code?

Please help me to insert the html code (button) into php code
54ff06b9ad8645e89ec927b3c69972e9.jpg
It is necessary to insert that html code into this php code
jsfiddle.net/meetaaronsilber/RN63Y

Answer the question

In order to leave comments, you need to log in

3 answer(s)
D
Dmitry Kuznetsov, 2015-11-07
@dima9595

Everything seems to be easy...
Put HTML code, remove "
<a class="button">
<span>press me</span>
</a>
Yes, from PHP I see the output of something...

E
Evanre, 2015-11-07
@Evanre

Well, initially it happens just the opposite, php code is inserted into html markup. Even if your file has the ".php" extension, this does not mean that nothing but php can be written there. Just close the php tag and write regular html.

<html>
<head>
  <title>My first PHP Page</title>
</head>
<body>
  Обычная html разметка
<?php 
  // тут пишем php код
?>
  Пишем дальше html
</body>

V
Vadim Ardanov, 2015-11-07
@ardanow

Voila :D

<?php
$button = '<div id="pagegradient"></div><a class="button"><span>press me</span></a>';
echo $button;
?>

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question