«« Next » « Previous
«« Next » « Previous

Link Details

Announcement

iPhone DZone: Fresh Links On Your iPhone by matt at Sat Jul 05 14:09:51 EDT 2008

Reading DZone on your iPhone just got a little bit easier. Visit http://dzone.com/iphone from your iPhone to try out our beta iPhone support. You can view stories, filter by tags, and login. We'd appreciate your feedback at feedback@dzone.com.

Stop waiting for the other guy to do it. Login and vote now.
Link 80983 thumbnail

By skoop
via jansch.nl
Submitted: May 14 2008 / 14:03

I just helped one of our developers with a weird problem. The piece of code he was working on contained roughly this: if ($str!='') { echo "Hello $str"; } He was importing a CSV file that didn't contain a value for $str, so $str was an empty string. So it should skip the echo statement according to the above code, right? Wrong. The script echoed "Hello ". It completely did the $str!='' wrong.
  • 3
  • 0
  • 107
  • 22

Add your comment


Html tags not supported. Reply is editable for 5 minutes. Use [code lang="java|ruby|sql|css|xml"][/code] to post code snippets.

Voters For This Link (3)



Voters Against This Link (0)