[eluser]teguh pribadi[/eluser]
Hey master...
I Need help about my program. it about the condition on CI. Its the Code:
Code:
foreach ($babs as $bab)
{
// Menghitung jumlah baris data sesuai bab_id
$babe=$bab->bab_id;
$num_e = $this->materi_model->jumlah_bar($babe);
// Penyusunan data baris per baris, perhatikan pembuatan link untuk updat dan delete
$this->table->add_row( ++$i, //kolom nomor
$babe, //kolom bab_id
$bab->bab_nama, //kolom bab_nama
$bab->bab_ket, //kolom bab_ket
$bab->bab_status, //kolom bab_status
anchor('Bab/bab_update/'.$bab->bab_id,'Edit'),
if ($num_e == 0)
{
anchor('Materi/buat/'.$bab->bab_id,'Buat Materi',array('class' => 'update'))
}
else
{
anchor('Materi/buat_proses/'.$bab->bab_id,'Update Materi',array('class' => 'update'))
}
);
}
The error start on LINE 97 (if ($num_e == 0)........) until end.
The page shown "Parse error: syntax error, unexpected T_IF in ................application\controllers\Bab.php on line 97"
How Must I do?