Re: [PHP] HTML Utilities

2004-03-13 Thread Red Wingate
woops :-) function toList ( $array ) { $temp = ''; foreach ( $array AS $item ) { if ( is_array ( $item ) ) { $temp .= ''.toList ( $array ).''; } else { $temp .= ''.$item.''; } } return ''.$temp.'' ; } $array = array ( 10 , 20 , array ( 30 , 40 ) ); echo toList (

Re: [PHP] HTML Utilities

2004-03-13 Thread Red Wingate
How about this: function toList ( $array ) { $temp = ''; foreach ( $array AS $item ) { if ( is_array ( $item ) ) { $temp .= ''.toList ( $array ).''; } else { $temp .= ''.$item.''; } } return $temp ; } $array = array ( 10 , 20 , arra

[PHP] HTML Utilities

2004-03-13 Thread Jeff Oien
Are there any ready made utilities out there for adding HTML tags to lists? For example if I have: This Thing That Thing The Other Thing Lot More Things etc. I would like to have something that would either add (including at beginning and end) or . If there's nothing out there I'll try to do it