Answer the question
In order to leave comments, you need to log in
How to display data in html using php?
Unable to display data on html page from php.
This code is stored in PHP
<?php
{
print '
<li><a href="index.html">Главная</a></li>
<li><a href="company/index.html">О компании</a></li>
<li><a href="partnery/index.html">Партнеры</a></li>
<li><a href="arenda-spetstehniki/index.html">Аренда спецтехники</a></li>
<li><a href="prajs-list/index.html">Прайс-лист</a></li>
<li><a href="kontakty/index.html">Контактная информация</a></li> ' ;
}
?>
<div id="menu">
<ul>
<?php
include ('php/menu.php');
?>
</ul>
</div>
Answer the question
In order to leave comments, you need to log in
Because quotes need to be closed!
at the end of the print you need to put not ; a ';
Look at the server logs, there will be an error due to which the code is not executed.
And to make sure that the error is in php/menu.php, you can also simply follow the link /php/menu.php and if there is a white page, then the error is in the php code.
If your text is displayed, it means that you are connecting your file with the menu incorrectly, or there is an error in the php code somewhere earlier, even before including this file.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question