Answer the question
In order to leave comments, you need to log in
How to execute given htmlspecialchars_decode function?
How to execute given function in my code:htmlspecialchars_decode
<?php
require_once 'connection.php';
$link = mysqli_connect($host, $user, $password, $database)
or die("Ошибка " . mysqli_error($link));
$query ="SELECT `id`, `company`, `status_1`, `data_1`, `data_2`, `file`, `summ`, `status_2`, `note` FROM appcation WHERE 1";
$result = mysqli_query($link, $query) or die("Ошибка " . mysqli_error($link));
if($result)
{
$rows = mysqli_num_rows ($result); // количество полученных строк
for ($i = 0 ; $i < $rows ; ++$i)
{
$row = mysqli_fetch_row ($result);
echo "<tr>";
for ($j = 0 ; $j < 9 ; ++$j) echo "<td>$row[$j]</td>";
echo "</tr>";
}
echo "</table>";
mysqli_free_result($result);
}
mysqli_close($link);
?>
Answer the question
In order to leave comments, you need to log in
In a loop:
echo "<tr>";
for ($j = 0 ; $j < count($row) ; ++$j) {
echo "<td>";
echo htmlspecialchars_decode($row[$j]);
echo "</td>";
}
echo "</tr>";
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question