Programming Forums

Programming Forums (http://www.programmingforums.org/forumindex.php)
-   PHP (http://www.programmingforums.org/forum29.html)
-   -   Parse Error (http://www.programmingforums.org/showthread.php?t=485)

TerraNerd Sep 7th, 2004 5:49 PM

i get this error:

Parse error: parse error, unexpected '}' in C:\Program Files\Apache Group\Apache2\htdocs\Name.php on line 4

this is the beginning of the script:

1. <?php
2. if ( isset ( $name ) ) {
3. print "<h1>".$name."</h1>"
4. } else {
5. print "<h1>"."Hello! Type in your name!"."</h1>"
6. }
7. ?>


whats wrong

Infinite Recursion Sep 7th, 2004 6:57 PM

You have to have ; after your prints...
:

<?php

        if ( isset ( $name ) )
        {
        print "<h1>".$name."</h1>";
 }
        else
        {
        print "<h1>"."Hello! Type in your name!"."</h1>";
        }
?>


TerraNerd Sep 7th, 2004 8:11 PM

:huh: infinite, do me a favor.

Next time im this retarded, slap me. thanks

Infinite Recursion Sep 7th, 2004 10:16 PM

10 4... but only if i can use a baseball bat. ;)

Berto Sep 8th, 2004 2:31 AM

lol, an anoying but happens error :)

Infinite Recursion Sep 8th, 2004 8:26 AM

Of course, happens ALL of the time to me in C++... and I've been coding for yearrrrrrrrrrrrrs.

Pizentios Sep 8th, 2004 8:32 AM

heh, don't feel bad Berto, everybody does it.

Berto Sep 8th, 2004 10:16 AM

I dont wasnt my error :),

My errors are normally so ridiculous that they make no sense


All times are GMT -5. The time now is 11:10 AM.

Powered by vBulletin® Version 3.7.0, Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Copyright ©2007 DaniWeb® LLC