All pastes #757512 Raw Edit

Mine

public php v1 · immutable
·published 2007-11-01 12:22 UTC
rendered paste body
imap_createmailbox($mbox, imap_utf7_encode("{imap.example.org}INBOX.Test"));imap_createmailbox($mbox, imap_utf7_encode("{imap.example.org}INBOX.haha"));imap_createmailbox($mbox, imap_utf7_encode("{imap.example.org}INBOX.Test.hehe"));imap_createmailbox($mbox, imap_utf7_encode("{imap.example.org}INBOX.Test.hehe.huhu"));imap_createmailbox($mbox, imap_utf7_encode("{imap.example.org}INBOX.miav"));function print_mailboxes($start = ""){	//print $start;	global $mbox;		$list = imap_getmailboxes($mbox, "{localhost:143/novalidate-cert}$start", "%");		if (is_array($list)) {	    foreach ($list as $key => $val) {		   $name = str_replace("{localhost:143/novalidate-cert}$start", "", $val->name);		   print $name."<br>";			if (!($val->attributes & LATT_HASNOCHILDREN)) {				if($start = ""){					$next = $start . ".";									} else{					$next = $start;				}				print_mailboxes($next . $name);			}			echo "<br />\n";	    }	}}the output of print_mailboxes is:INBOX.TestINBOX.miavINBOX.haha