Annoying Poll
Moderator: General Moderators
Things that go booooooooom in the night
So I used to be sane, rational even a lovable person, then along came PHP !!!!! nuff said 
the missing } 6 brackets is a headache, the missing ; also drive me crazy, but the biggest headache is creating dynamic javascript using php and get lost in all those \"'"\''\""'''''''' between the php code, javascript and html. arrrrrggghhhhhhhh.
best mistake is missing the where clause in update an delete.
best mistake is missing the where clause in update an delete.
-
JasonMichael
- Forum Newbie
- Posts: 8
- Joined: Fri Sep 24, 2004 1:19 pm
Here's a great typo:
Some newbie I was helping had that semi-colon immediately after his FOR statement, as illustrated above. PHP didn't even complain about the braces. For an hour I tried to help him figure out what the heck was going wrong with his code, until finally I saw that extra semi-colon that I kept missing - probably because it wasn't a nice "black-and-white" color, as it is here on this forum. It was some puke green color, and barely visible.
Code: Select all
<?php
for ($x=0;$x<$count;$x++) ;
{
//... do your stuff here....
}
?>-
Black Unicorn
- Forum Commoner
- Posts: 48
- Joined: Mon Jun 16, 2003 9:19 am
- Location: United Kingdom
The most error prone scripting is when I have to write some PhP that makes Javascript which in turn processes some strings. Like:
Hell, it may even be buggered as I demonstrate ...
The only reason I still vote for ; is because it is ALWAYS fair to assum it's a backslash issue before anything else when I deal with'em.
$moment->destroy();
Code: Select all
<?php
for ($i=0;$i<sizeof($cluster);$i++){
$js.= "document.writeln("This is a nice ".$cluster[$i]["name"]."");";
$js.= "\r\ndocument.write("buildMenu('".$somename."')");";
}
?>The only reason I still vote for ; is because it is ALWAYS fair to assum it's a backslash issue before anything else when I deal with'em.
$moment->destroy();
- John Cartwright
- Site Admin
- Posts: 11470
- Joined: Tue Dec 23, 2003 2:10 am
- Location: Toronto
- Contact:
yeah, that whole file is on live server, file is dev server gets me all the time...the big problem is that we have two live servers in different places and the local dev server....nothing like hitting refresh 10 times and screaming at the monitor to show the damn debug echo statement that you know you just saved and loaded to the other damn server
