A
A
apaicer2018-02-13 19:36:18
PHP
apaicer, 2018-02-13 19:36:18

Is it possible to add a div class to an insert?

If in short. In php insertion, I process a sql request to display the login, last name and first name. And the output happens line by line and everything would be fine if only they are pressed against the header of the site, and if you set margin-top, then each line indents from the other, and I need to push all these entries into the box, for this I need another div. But no matter how I tried to insert it, nothing happens. Is there a solution at all, or do I need to make crutches in css?

<?php
Много не важного кода

$Query = mysqli_query($CONNECT, 'SELECT `login`, `fname`, `lname`, `oname` FROM `users` ORDER BY `id` DESC LIMIT 15');
while ($Row = mysqli_fetch_assoc($Query)) $Draw .= '<div class="allusers"><br>Логин: '.$Row[login].' (фамилия: '.$Row[lname].'	имя: '.$Row[fname].')</div>';

Много не важного кода
?>

Answer the question

In order to leave comments, you need to log in

1 answer(s)
L
Lazy @BojackHorseman PHP, 2018-02-13
@apaicer

$Draw .= '<div>';

while ($Row = mysqli_fetch_assoc($Query)) $Draw .= '<div class="allusers"><br>Логин: '.$Row[login].' (фамилия: '.$Row[lname].'	имя: '.$Row[fname].')</div>';

$Draw .= '</div>';

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question