
July 11th, 2000, 10:06 AM
|
|
Junior Member
|
|
Join Date: Jul 2000
Posts: 12
Time spent in forums: < 1 sec
Reputation Power: 0
|
|
|
Hey guys,
I just started to learn PHP, and I have a strong background Borland Delphi and HTML. But, I am new to this so i was hoping someone could help me out. Are their procedures? Like you have...
function what($var) {
blah
}
and in perl you can do a simple procedure without variables like
sub whatever{
blah
}
What would the 'sub' be equivilent to in PHP? I have a error message I want posted throughout a page if there are form errors, and i know i can just do include but I would rather use a procedure, at least to learn how its done. Here's the code im using...maybe i just messed up the syntax or something...
sub ErrorMsg {
echo "error message here";
}
Hope someone can help me out,
-Bryan
|