<?php $list = '<select name="page">'; { $checked = ($this->PageList[$i]['page_id'] == $id) ? 'selected' : ''; if($this->PageList[$i]['page_parent'] == 0) { $list .= '<option value="' . $this->PageList[$i]['page_id'] . '" ' . $checked . '>' . $this->PageList[$i]['page_title'] . '</option>'; { if($this->PageList[$j]['page_parent'] == $this->PageList[$i]['page_id']) { $par = 1; $list .= '<option value="' . $this->PageList[$j]['page_id'] . '" ' . $checked . '>- ' . $this->PageList[$j]['page_title'] . '</option>'; { if($this->PageList[$a]['page_parent'] == $this->PageList[$j]['page_id']) { $par = $par+1; } } if($par > 1) { $tag = '-'; { if($this->PageList[$j]['page_id'] == $this->PageList[$r]['page_parent']) { $tag .= '-'; $list .= '<option value="' . $this->PageList[$r]['page_id'] . '" ' . $checked . '>' . $tag . ' '. $this->PageList[$r]['page_title'] . '</option>'; } } } } } } } if(!$parent) { $list .= '<option value="0">Nigdzie nie nalezy</option>'; } $list .= '</select>'; ?>
Wszystko jest ok na takim poziomie:
Strona główna
- podstrona 1
-- podstrona 2
a jak już daje 3 i 4 podstronę to pokazuje tak samo:
Strona główna
- podstrona 1
-- podstrona 2
Proszę o pomoc bo walczę z tym od wczoraj i się zamotałem
