$this_url=trim($buffer[4]); $x=strlen($this_url)-1; if($this_url[0]=='/'){$this_url[0]='';} if($this_url[$x]=='/'){$this_url[$x]='';} welkk is working on my windows machine, but will it work on any other machine?!
This would probably be better, assuming you're trying to remove directory separators from the end and beginning of a path. $this_url = trim($buffer[4], " \t\n\r\0\x0B\xA0\\/"); PHP: