Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Functions - writing and calling

Status
Not open for further replies.

annasue

Technical User
Mar 20, 2004
21
0
0
US
I am new to PHP and I know this is a very simple question; please forgive me.

I want to write a function that will print an entire table in html.

I have:

function writetable() {
?>
"ALL THE HTML TABLE STUFF"
<?php
}

then I try calling the function as:

writetable();

I'm getting an error - am I holding my mouth wrong?

Thanks in advance.
 
Hi,
do this instead:
<?php

function writetable() {

"ALL THE HTML TABLE STUFF"

?>
}

writetable();

do you still get an error? what does it say?

[cheers]
Cheers!
Laura
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top