empty string parameters to backslashes?

From: Date: Fri, 06 Dec 2002 04:43:08 +0000
Subject: empty string parameters to backslashes?
Groups: php.general 
Request: Send a blank email to php-general+get-127221@lists.php.net to get a copy of this message
Hey all - I'm trying to track down a problem with someone else's code. Our hosting service changed PHP versions on us (up to 4.0.6), and everything broke. I think I have tracked down at least part of the problem. We have a function: funA($args) { $file = substr($args[0],0, -1); //file to open from path $alt = $args[1]; //if invalid/no file, use this file $name = $args[2]; //the name associated with the tabs $size = $args[3]; //size to make the box (optional) print "funA START: file: " . $file . ", name: " . $name . ", alt: " . $alt . ", size: " . $size . "<BR>"; . . . } Called like this: funA("nameString", " ", " ", "177"); But the output of the print statement looks like this: funA START: file: productBrief, name: \, alt: \, size: 177\ So where did the darned backslashes come from? Any ideas? thanks, andy wallace andyw@scroom.com -- Have you been SCROOMed? http://www.scroom.com Andy Wallace, Publisher andyw@scroom.com Get the Opera Browser! http://www.opera.com

« previous php.general (#127221) next »