Re: First stupid post of the year.

From: Date: Wed, 02 Jan 2008 18:57:49 +0000
Subject: Re: First stupid post of the year.
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-266484@lists.php.net to get a copy of this message
On Jan 2, 2008 1:34 PM, tedd <tedd@sperling.com> wrote: > Hi gang: > > I have a > > $submit = $_POST['submit']; > > The string contains: > > &nbsp; &nbsp; &nbsp; &nbsp;A&nbsp; &nbsp; &nbsp; &nbsp; > > (it's there to make a submit button wider) > > How can I strip out the "&nbsp;" from the $submit string leaving "A"? > > I've tried > > trim($submit); > > but, that don't work. > > Neither does: > > $submit = str_replace('&nbsp;','',$submit); > > or this: > > $submit = str_replace(' ';','',$submit); > > I should know what to do, but in this case I don't. > > Help is always appreciated. <? // Your existing code here.... $submit = trim(str_replace('&nbsp;','',$submit); ?> -- Daniel P. Brown [Phone Numbers Go Here!] [They're Hidden From View!] If at first you don't succeed, stick to what you know best so that you can make enough money to pay someone else to do it for you.

« previous php.general (#266484) next »