RE: [PHP] Making a string from an Array

From: Date: Thu, 25 Oct 2001 15:34:40 +0000
Subject: RE: [PHP] Making a string from an Array
Groups: php.general 
Request: Send a blank email to php-general+get-72289@lists.php.net to get a copy of this message
$ignored = ""; $include = ""; <snip> { $ignored.= $words[$i]; } else { $included.= $words[$i]; -Stewart -----Original Message----- From: Sam [mailto:Sam@dragoman.co.uk] Sent: 25 October 2001 16:18 To: 'php' Subject: [PHP] Making a string from an Array Hi all, this may be an easy question, but I'm stuck... how can this, $words = explode(" ", $keywordText); for ( $i = 0; $i < count( $words ); $i++ ) { if ($words[$i]=="on" OR $words[$i]=="the" OR $words[$i]=="in" OR$words[$i]=="at" OR $words[$i]=="is" OR $words[$i]=="it") { $ignored[] = $words[$i]; } else { $included[] = $words[$i]; } } How can I make $included and $ignored a string instead of an array. Thanks Sam Rose p.s. Also I'm only on the digest, so if you could reply directly to me as well, that would be a bonus.

« previous php.general (#72289) next »