hi everyone,

i'm experimenting with a simple php script, and here's what it looks like:

if ($var1 == "222") {
write();
}
else {
echo("Error");
}


fuction write()
echo("this is a test");

but the function write() doesn't execute when i call the write(); , and i get an error from my server.
i'm pretty new to php so would somebody please help me out on how to call a function up.

Thank you
Sang N
sang@vinasite.com