Stacking Functions
April 10, 2003 by daynah
Filed under Code Snippets
ucwords(eregi_replace(‘font’, ‘ font’, profileFont($the_lastlogin->fontsize)))
Oh my, this is an example of my coding now. I tend to throw a lot of functions at my variables. hehe
What exactly does this do in my program? Well, $the_lastlogin->fontsize is the variable I got my my query. The profileFont() function is a something I wrote that returns the font name according to the id I pass it. The eregi_replace() is there to display the font name as …”small font” rather than “smallfont.” And the ucwords() function capitalizes the first letter of each word, so the result would be “Small Font” rather than “small font.” Whew. All that in ONE line. :)
