HTML/PHP snippet library

Does anyone have a nice collection of HTML / PHP macros? You know, turning lines of text into dropdown boxes, arrays, other HTML tags?