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 Westi on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

php syntax error help

Status
Not open for further replies.

leegold2

Technical User
Oct 10, 2004
116
given I have in main.php :

<?php
require_once 'breadcrumbs.php';
?>

and in breadcrumbs.php I have:

<?
class breadcrumb {
echo '1234';
}
?>

I get an error message:

Parse error: parse error, unexpected T_ECHO, expecting T_OLD_FUNCTION or
T_FUNCTION or T_VAR or '}' in
/mnt/web_j/d02/s44/a00071yw/ on line 3

I'm doing this on my remote host. breadcrumbs.php is in the same dir as
main.php.

What could the problem be?

Thanks
 
<?
{
echo '1234';
}
?>


That works.
I needed the {... } but not "class" .
I 'm not doing objects...

Sorry to bother.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top