Re: First stupid post of the year.

From: Date: Wed, 02 Jan 2008 19:36:10 +0000
Subject: Re: First stupid post of the year.
References: 1 2 3  Groups: php.general 
Request: Send a blank email to php-general+get-266503@lists.php.net to get a copy of this message
don't use nonbreaking spaces use CSS to style the input button then you wont have to deal with redundant presentational gunk in your data On 1/2/08, David Giragosian <dgiragosian@gmail.com> wrote: > On 1/2/08, Nathan Nobbe <quickshiftin@gmail.com> wrote: > > > > 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. > > > > > > why dont you just style the button w/ css? > > > > style="width:200px" > > > > -nathan > > > > Parse the string character by character discarding '&' , 'n' , > 'b' , 's' > , 'p' , and ';'. Assuming of course that the part of the label you want to > keep is none of those characters. > > -David >

« previous php.general (#266503) next »