Re: Double quotes question

From: Date: Tue, 04 Jun 2002 06:34:35 +0000
Subject: Re: Double quotes question
References: 1  Groups: php.windows 
Request: Send a blank email to php-windows+get-14066@lists.php.net to get a copy of this message
"Clay Culver" <cculver@darkness-is.com> wrote: > > I have a script that lists the files in a directory, and > create links accordingly but if the files contain spaces then the link > won't come out correctly. I am fairly new to PHP and have no real idea > on how I can get it to make links show as <a href="link"></a> currently > it will put links like <a href=link></a> which is causing the problem. Quotes are not enough. If your filename contains spaces or other 'special' characters you will still have the problem. I suggest you try use function urlencode() to create URLs. print ("<A HREF=\"urlencode($link)\">link descr.<A>") This could be helpfull, but you must check it.

« previous php.windows (#14066) next »