为什么我在代码中没有FORMS时会得到未定义的索引

时间:2014-08-06 08:27:38

标签: php forms undefined-index

所以我想制作一个dinamyic菜单,但我遇到了未定义的索引问题,你能帮我找出原因吗?

<?php

include_once('includes/connection.php');
include_once('includes/articol.php');

$articol = new articol;
$articole = $articol->fetch_all();
?>

来自身体的代码

<li  id="current"><a class="links" href="index.html">Acasa</a></li>
          <?php foreach ($articole as $articol) { ?>
          <li><a class="links" href="articol.php?id=<?php echo $articol['articol_id']; ?>">

          <?php echo $articol['articol_titlu']; ?>


          </a></li>
          <li><a class="links" href="galben.html">Galben</a></li>
          <li><a class="links" href="albastru.html">Albastru</a></li>
          <li><a class="links" href="drapel.html">Drapel</a></li>
          <li><a class="links" href="despre.html">Despre</a></li>
          <li><a class="links" href="contact.html">Contact</a></li>
    <?php } ?>

我在

处获得了未定义的索引
<li><a class="links" href="articol.php?id=<?php echo $articol['articol_id']; ?>">

          <?php echo $articol['articol_titlu']; ?>

0 个答案:

没有答案