Umm... function top($image = '') { echo("bla bla $image bla"); }
Might need to use an IF (because of having 2 spaces if the image is empty) -Jason Garber IonZoft.com At 10:14 AM 10/24/2001 -0700, Richard S. Crawford wrote: >function top ($image) { > if ($image) echo "blah blah blah"; > else echo "blah blah $image blah"; >} > >There's probably a more efficient way to do it. > > >At 09:57 AM 10/24/2001, sunny AT wde wrote: >>hi all!! >> >>i'm writing functions like - >>------- >>function top () { >> echo "blah blah blah";} >>------- >> >>what i want to do is make it so that i can do - >>------- >>function top($image) { >> echo "blah blah $image blah"; } >>------- >> >>but also make the $image parameter in the top() as optional. so if >>its not there, then tell php not to worry about it. >> >>any ideas?? >> >>thanks! >> >>sunny >> >> >>__________________________________________________ >>Do You Yahoo!? >>Make a great connection at Yahoo! Personals. >>http://personals.yahoo.com >> >>-- >>PHP General Mailing List (http://www.php.net/) >>To unsubscribe, e-mail: [EMAIL PROTECTED] >>For additional commands, e-mail: [EMAIL PROTECTED] >>To contact the list administrators, e-mail: [EMAIL PROTECTED] > > >Sliante, >Richard S. Crawford > >http://www.mossroot.com >mailto:[EMAIL PROTECTED] >AIM: Buffalo2K ICQ: 11646404 Y!: rscrawford >"It is only with the heart that we see rightly; what is essential is >invisible to the eye." --Antoine de Saint Exupéry > >"Push the button, Max!" > > >-- >PHP General Mailing List (http://www.php.net/) >To unsubscribe, e-mail: [EMAIL PROTECTED] >For additional commands, e-mail: [EMAIL PROTECTED] >To contact the list administrators, e-mail: [EMAIL PROTECTED] > -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]