Welcome Guest, Not a member yet? Register   Sign In
Undefined index
#2

[eluser]vile[/eluser]
[quote author="Axelline" date="1279712795"]I have wrote this:

Code:
<?php
        if(count($daftar_dokumen)) {
            foreach ($daftar_dokumen as $indeks => $list) {
                $i = $indeks +1 + $on_page;
                echo "<tr  height='30' class='rowJadwal'><td class = 'rowJadwalTepi' width='5'> </td>";
                echo "<td align = 'center'>".$i."</td>" ;
                echo "<td>".anchor("dokumen/detailDokumen/".$list['kode_dokumen'],$list['judul_dokumen'],array('class'=>'linkAllPengumuman'))."</td>";
                echo "<td>".$list['nama_kategori_dokumen']."</td>";
                echo "<td>".$list['unit_kerja_stis']."</td>";
                echo "<td class = 'rowJadwalTepi' width='5'> </td>";
                echo "<tr>";
            }
        }
        ?&gt;



And then the warning like this:
A PHP Error was encountered

Severity: Notice

Message: Undefined index: kode_dokumen

Filename: dokumen/daftarDokumen.php

Line Number: 19


The code i have wrote was implemented to another function and it works but why it can't be at this function?[/quote]

check $list array if it contains $list['kode_dokumen'] index..


Messages In This Thread
Undefined index - by El Forum - 07-21-2010, 12:46 AM
Undefined index - by El Forum - 07-21-2010, 01:05 AM
Undefined index - by El Forum - 07-21-2010, 05:41 AM



Theme © iAndrew 2016 - Forum software by © MyBB