Re: trim() white space from record set

From: Date: Thu, 22 Jul 2004 08:57:10 +0000
Subject: Re: trim() white space from record set
References: 1 2 3 4 5 6 7 8  Groups: php.general 
Request: Send a blank email to php-general+get-191491@lists.php.net to get a copy of this message
On Thu, 22 Jul 2004 05:50, Msa wrote: > aaah, simple for you.. > > I have to fit that line into the following: > > $colauthor_rsResults = "0"; > if (isset($_GET['Author'])) { > $colauthor_rsResults = (get_magic_quotes_gpc()) ? $_GET['Author'] : > addslashes($_GET['Author']); > } > > and don't know how to do that.....also, I am using GET.... > So, $colauthor_rsResults is the field you want trimmed? Just do it after you finish the If. $colauthor_rsResults = "0"; if (isset($_GET['Author'])) { $colauthor_rsResults = (get_magic_quotes_gpc()) ? $_GET['Author'] : addslashes($_GET['Author']); } $colauthor_rsResults =trim($colauthor_rsResults); -- David Robley Never enter a battle of wits unarmed.

« previous php.general (#191491) next »