> function GetAttributes($id)
> {
>       // query db
> 
>       // get records
> 
>       // return record array
> }
> 
> function BuildAttributes($id)
> {
>       $attributes = GetAttributes($id);
> 
>       // format $attributes
> 
>       // return HTML string
> }


That is a good way...you have the functions only doing what they need to
do. Thus splitting up some of the logic and presentation. In the
GetAttributes function you could do any filtering...but mainly you dont
want to do any presentation because u can now reuse that function other
places.

--
BigDog


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to