V
V
Vyacheslav Mulyukin2015-10-19 23:58:36
PHP
Vyacheslav Mulyukin, 2015-10-19 23:58:36

How to insert variables into html code in php?

echo '
<div class="stroka_klient">
<div class="id_klient">'.$user['K_id'].'</div>
<div class="name_klient"></div>
<div class="telephone_klient">8-926-737-84-48</div>
<div class="email_klient">[email protected]</div>
<div class="site_klient">land</div>
</div>";

gives an error message

Answer the question

In order to leave comments, you need to log in

1 answer(s)
A
Andrew, 2015-10-20
@R0dger

Better like this

<div class="stroka_klient">
    <div class="id_klient"><?= $user['K_id']?></div>
    <div class="name_klient"></div>
    <div class="telephone_klient">8-926-737-84-48</div>
    <div class="email_klient">[email protected]</div>
    <div class="site_klient">land</div>
</div>

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question