Re: Script stuck on final ?>

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Alp wrote:
> Why would a php script get stuck at the ver last line of code in php/mysql
> combination? I'm getting a parse error at the very last line.

It may help you (now and in the future) to remember that PHP is just a
program, that reads your script, line by line, and then tries to convert
what you typed into an "action" for it to take.

If it's complaining on the last line, then, most likely, it expecting
something *MORE* from you, based on what you already have typed.

So you're missing the ending part of something, like an ending " mark, or
an ending ' or an ending } or an ending ) or an ending ] or something of
that nature.

It's also a good idea to be FANATIC about your alignment of beginning and
ending { } markers -- There are religious arguments about where exactly
they should be placed, but pick whatever seems most reasonable to you and
stick to it, and ALWAYS line them up the same with CONSISTENT indentation.

Otherwise, you'll spend the rest of your programming life looking for
missing }

You may also want to get a good color-coding editor.  A quick Google for
"PHP Editors" should turn up tons of them.

-- 
Like Music?
http://l-i-e.com/artists.htm

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux