I'm using functions on a website I'm creating.
I'm curious if we can use if statements, etc in a function?
For example:
the periods obviously represent the content...PHP Code:function my_function($yeah) {
if (...) {....}
elseif (...) {....}
else {....}
}
at any rate, is such a thing possible?
I have statements that repeat themselves, with just one part changing. so I figured if I could just call a function for it, I wouldn't have to keep rewriting the statements?
Thanks



Reply With Quote


Bookmarks