Page 1 of 1

What is the use for replacing space for space?

Posted: Sat Aug 26, 2006 9:34 am
by RobertGonzalez
Is this piece of code that replaces a space for a space really doing anything other than slowing down the app?

Code: Select all

$search = str_replace(" ", " ", urldecode($search));
This just seems unusually silly to me.

Posted: Sat Aug 26, 2006 9:48 am
by feyd
replacing space for space.. useless.

Posted: Sat Aug 26, 2006 10:11 am
by RobertGonzalez
I thought so. Man, I cannot believe what some developers do sometimes. That is utterly frustrating. Thanks for the confirmation.