SitePoint Sponsor

User Tag List

Page 2 of 3 FirstFirst 123 LastLast
Results 26 to 50 of 70

Thread: you != you!

  1. #26
    _ silver trophy ses5909's Avatar
    Join Date
    Jul 2003
    Location
    NoVa
    Posts
    5,467
    Mentioned
    1 Post(s)
    Tagged
    1 Thread(s)
    how about strtrim($string)...wait that's c.

    ummm

    str_trim()???
    Sara

  2. #27
    SitePoint Wizard Young Twig's Avatar
    Join Date
    Dec 2003
    Location
    Albany, New York
    Posts
    1,355
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Alternatively, you could do something like this:
    PHP Code:
    if(preg_replace('~^(\s*)[^\s]*~'''chop(str_replace(array('<br />'),array("\n"),nl2br($receiver)))) == preg_replace('~^(\s*)[^\s]*~'''chop(str_replace(array('<br />'),array("\n"),nl2br(stripslashes(addslashes($ownerId)))))))
    {
        
    logIt("$reciever IS equal to $ownerId");


    else 
    {
        
    logIt("$ownerId is not equal to $receiver");


  3. #28
    SitePoint Zealot Scout141's Avatar
    Join Date
    Mar 2003
    Location
    Canada
    Posts
    137
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    All kidding aside, were these example variables or real script that is copyied and pasted? If so, it contains a typo...

    PHP Code:
    if ($receiver==$ownerId//i've also tried:if ($receiver===$ownerId)
    {
    logIt("$reciever IS equal to $ownerId");
    } else {
    logIt("$ownerId is not equal to $receiver");

    $receiver != $reciever

    ...

    Edit:


    of course, looking over the code again, it doesn't look like the typo would result in the output you're getting anyhow...

    *Jumps on bandwagon*

    So... Have you tried trim()?




  4. #29
    He's No Good To Me Dead silver trophybronze trophy stymiee's Avatar
    Join Date
    Feb 2003
    Location
    Slave I
    Posts
    23,449
    Mentioned
    1 Post(s)
    Tagged
    1 Thread(s)
    Off Topic:

    Even though I don't think this will beat the lo0ol Fighting Robots thread, I tihnk this should be nomintaed for the funniest thread award at the end of the year.

  5. #30
    eschew sesquipedalians silver trophy sweatje's Avatar
    Join Date
    Jun 2003
    Location
    Iowa, USA
    Posts
    3,749
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Off Topic:

    Quote Originally Posted by stymiee
    Even though I don't think this will beat the lo0ol Fighting Robots thread, I tihnk this should be nomintaed for the funniest thread award at the end of the year.
    No, it will be the funniest thread when he comes back and we all find out it was a character encoding issue and not a whitespace issue

    BTW, where the link to the Fighting Robots thread?

  6. #31
    _ silver trophy ses5909's Avatar
    Join Date
    Jul 2003
    Location
    NoVa
    Posts
    5,467
    Mentioned
    1 Post(s)
    Tagged
    1 Thread(s)
    Quote Originally Posted by stymiee
    Off Topic:

    Even though I don't think this will beat the lo0ol Fighting Robots thread, I tihnk this should be nomintaed for the funniest thread award at the end of the year.
    I SECOND THAT!!
    Sara

  7. #32
    l บ 0 บ l silver trophybronze trophy lo0ol's Avatar
    Join Date
    Aug 2002
    Location
    Palo Alto
    Posts
    5,329
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Off Topic:

    Quote Originally Posted by ses5909
    Quote Originally Posted by stymiee
    Off Topic:


    Even though I don't think this will beat the lo0ol Fighting Robots thread, I tihnk this should be nomintaed for the funniest thread award at the end of the year.

    I SECOND THAT!!
    I don't support that, as the lo0ol Fighting Robots thread is all about me. A pity it wasn't started by me, however. Actually, maybe I should vote for this so Mike isn't validated for stealing my personality for use in a funny thread. Oh, choices, choices.


    And... on topic... um... trim it.
    .
    Zach Holman
    good-tutorials — blog — twitter — last.fm

  8. #33
    He's No Good To Me Dead silver trophybronze trophy stymiee's Avatar
    Join Date
    Feb 2003
    Location
    Slave I
    Posts
    23,449
    Mentioned
    1 Post(s)
    Tagged
    1 Thread(s)
    Quote Originally Posted by sweatje
    Off Topic:



    No, it will be the funniest thread when he comes back and we all find out it was a character encoding issue and not a whitespace issue

    BTW, where the link to the Fighting Robots thread?
    Off Topic:

    http://www.sitepoint.com/forums/showthread.php?t=234974&highlight=lo0ol

  9. #34
    SitePoint Wizard Young Twig's Avatar
    Join Date
    Dec 2003
    Location
    Albany, New York
    Posts
    1,355
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by Scout141
    All kidding aside, were these example variables or real script that is copyied and pasted? If so, it contains a typo...

    PHP Code:
    if ($receiver==$ownerId//i've also tried:if ($receiver===$ownerId)
    {
    logIt("$reciever IS equal to $ownerId");
    } else {
    logIt("$ownerId is not equal to $receiver");

    $receiver != $reciever

    ...

    Edit:


    of course, looking over the code again, it doesn't look like the typo would result in the output you're getting anyhow...

    *Jumps on bandwagon*

    So... Have you tried trim()?



    $receiver is found twice. $reciever is found once. But who knows?

  10. #35
    FBI secret agent digitman's Avatar
    Join Date
    Sep 2004
    Location
    Work
    Posts
    697
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Who ever can guess how I fixed the problem gets a $100 PM as prize!

  11. #36
    l บ 0 บ l silver trophybronze trophy lo0ol's Avatar
    Join Date
    Aug 2002
    Location
    Palo Alto
    Posts
    5,329
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Using trim()!
    .
    Zach Holman
    good-tutorials — blog — twitter — last.fm

  12. #37
    FBI secret agent digitman's Avatar
    Join Date
    Sep 2004
    Location
    Work
    Posts
    697
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    you do know that PM= Play money right?
    Who ever can guess how I fixed the problem gets a $100 PM as prize!

  13. #38
    l บ 0 บ l silver trophybronze trophy lo0ol's Avatar
    Join Date
    Aug 2002
    Location
    Palo Alto
    Posts
    5,329
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Yes, and I expect payment in full.
    .
    Zach Holman
    good-tutorials — blog — twitter — last.fm

  14. #39
    eschew sesquipedalians silver trophy sweatje's Avatar
    Join Date
    Jun 2003
    Location
    Iowa, USA
    Posts
    3,749
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I would expect that payment is a little bit more trim() than you expected.

  15. #40
    FBI secret agent digitman's Avatar
    Join Date
    Sep 2004
    Location
    Work
    Posts
    697
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    i would expect your eye sight is too!! who misses PM?

    anyway, now that you all know how i solved the problem, help me out on the this thread!!!!:
    http://www.sitepoint.com/forums/showthread.php?t=275679

  16. #41
    dooby dooby doo silver trophybronze trophy
    spikeZ's Avatar
    Join Date
    Aug 2004
    Location
    Manchester UK
    Posts
    13,788
    Mentioned
    151 Post(s)
    Tagged
    3 Thread(s)
    So trim() helped then?
    Mike Swiffin - Community Team Advisor
    Only a woman can read between the lines of a one word answer.....

  17. #42
    FBI secret agent digitman's Avatar
    Join Date
    Sep 2004
    Location
    Work
    Posts
    697
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I can't believe this happend.

    When I made this post, i thought 'Hey, its only for fun! What can go wrong?', but I just lost a project because a client saw this post, and my email address, and as a result he thinks i'm unprofessional and decided to drop me!

  18. #43
    SitePoint Wizard samsm's Avatar
    Join Date
    Nov 2001
    Location
    Atlanta, GA, USA
    Posts
    5,011
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Yet another great reason to use example.com in testing.
    Using your unpaid time to add free content to SitePoint Pty Ltd's portfolio?

  19. #44
    SitePoint Enthusiast
    Join Date
    Jun 2005
    Posts
    81
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by digitman
    I can't believe this happend.

    When I made this post, i thought 'Hey, its only for fun! What can go wrong?', but I just lost a project because a client saw this post, and my email address, and as a result he thinks i'm unprofessional and decided to drop me!
    OMG That sucks
    (but it's also a little bit funny to be honest )

  20. #45
    FBI secret agent digitman's Avatar
    Join Date
    Sep 2004
    Location
    Work
    Posts
    697
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Hey, shut it!

    Well, lots more fish in the sea!

  21. #46
    eschew sesquipedalians silver trophy sweatje's Avatar
    Join Date
    Jun 2003
    Location
    Iowa, USA
    Posts
    3,749
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by digitman
    I can't believe this happend.

    When I made this post, i thought 'Hey, its only for fun! What can go wrong?', but I just lost a project because a client saw this post, and my email address, and as a result he thinks i'm unprofessional and decided to drop me!
    He thinks it is unprofessional to seek help from one of the quickest responding, most knowledgable PHP communities on the net? Perhaps he would rather have you flounder around on a project on his dollar?

  22. #47
    dooby dooby doo silver trophybronze trophy
    spikeZ's Avatar
    Join Date
    Aug 2004
    Location
    Manchester UK
    Posts
    13,788
    Mentioned
    151 Post(s)
    Tagged
    3 Thread(s)
    Quote Originally Posted by sweatje
    He thinks it is unprofessional to seek help from one of the quickest responding, most knowledgable PHP communities on the net? Perhaps he would rather have you flounder around on a project on his dollar?
    damn true, where else would you get to 2 pages of suggestions on how to solve your problem?

    Seriously, the client must have been an *** with a sense of humour problem.
    If it didn't cost you too much $$$ then laugh it off, like you said, there ar eplenty more clients out there.

    Mike
    Mike Swiffin - Community Team Advisor
    Only a woman can read between the lines of a one word answer.....

  23. #48
    _ silver trophy ses5909's Avatar
    Join Date
    Jul 2003
    Location
    NoVa
    Posts
    5,467
    Mentioned
    1 Post(s)
    Tagged
    1 Thread(s)
    Quote Originally Posted by digitman
    I can't believe this happend.

    When I made this post, i thought 'Hey, its only for fun! What can go wrong?', but I just lost a project because a client saw this post, and my email address, and as a result he thinks i'm unprofessional and decided to drop me!
    That's horrible. I'm with sweatje on this. You used your resources to find the answers which is what any good programmer would do.
    Sara

  24. #49
    SitePoint Wizard samsm's Avatar
    Join Date
    Nov 2001
    Location
    Atlanta, GA, USA
    Posts
    5,011
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Someone who wasn't versed in programing enough to know that everyone has these sorts of problems might misinterpret the joke in this thread and think we are making fun of the guy.

    Actual joke: Several people post same solution at once, more people post same solution, making fun of people posting a solution that has already been presented. Dogpile on trim()!

    Possible perceived joke: Thread starter made error so dumb and obvious that entire forum conspires to mock him.

    A layperson might just not *get* that little problems tie up just about everyone at some time or another.
    Using your unpaid time to add free content to SitePoint Pty Ltd's portfolio?

  25. #50
    FBI secret agent digitman's Avatar
    Join Date
    Sep 2004
    Location
    Work
    Posts
    697
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Lol..hey you guys, don't take it personally! the client didn't drop me because I asked a question in this forum, but because the error was actually really obvious, and according to him, if i couldn't figure it out on my own i = inexperienced!

    Please post here and tell me what lesson do YOU learn from this? (No, I won't give out $100 PM to the guy who gives the best answer this time! )


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •