Hi Gurus
I hope I am going to make sense with this question:
I have an html page that I have turned into a php page with a bit of php code above the html (connect to database, massage data a
little, mix with html, etc...). Now, I would like to use a function in my php code, as otherwise I have to type the same thing over
and over again. With a function, I mean something along of the lines of:
function x($string) {
return strlen($string);
}
but obviously, the function is a bit more sophisticated.
My question is where should I put the function
a. in a separate file - and how should I link it in that case?
b. at the bottom of the file
c. at the top of the file
d. I should do it differently altogether
I would appreciate some hints. TIA
- Nicolaas