Re: [PHP] string concatenation from array

2003-08-14 Thread Analysis Solutions
On Tue, Aug 12, 2003 at 01:58:21PM -0600, Micah Montoy wrote: I'm having a bit of difficulty getting a string to attach to itself from an array. Here is the bit of code I'm working on. A bunch of simplifications, efficiency tweaks on this approach... $wresult = ; $wresult = '';

Re: [PHP] string concatenation from array

2003-08-14 Thread Jonathan Pitcher
Micah, The sign in PHP (to the best of my knowledge) does not concatenate. Use a . instead. See below. $wresult = ; foreach ($search_string as $word_result){ $wresult .= $word_result; } That should work for you. Jonathan Pitcher On Tuesday, August 12, 2003, at 02:58 PM, Micah

RE: [PHP] string concatenation from array

2003-08-14 Thread Chris W. Parker
Analysis Solutions mailto:[EMAIL PROTECTED] on Tuesday, August 12, 2003 1:02 PM said: OR you can do... $wresult .= $word_result; Don't forget the space: $wresult .= .$word_result; c. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit:

Re: [PHP] string concatenation from array

2003-08-14 Thread CPT John W. Holmes
From: Jonathan Pitcher [EMAIL PROTECTED] The sign in PHP (to the best of my knowledge) does not concatenate. Correct, it's a bitwise AND operator. http://us2.php.net/manual/en/language.operators.bitwise.php ---John Holmes... -- PHP General Mailing List (http://www.php.net/) To unsubscribe,

Re: [PHP] string concatenation from array

2003-08-14 Thread Peter James
- Original Message - From: Peter James [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Tuesday, August 12, 2003 2:18 PM Subject: Re: [PHP] string concatenation from array My personal favourite is to use an array. It's much cleaner syntax IMO...it is very easy to miss a '.' on a '.=', and introduce

[PHP] string concatenation from array

2003-08-14 Thread Micah Montoy
I'm having a bit of difficulty getting a string to attach to itself from an array. Here is the bit of code I'm working on. $wresult = ; foreach ($search_string as $word_result){ $wresult = $wresult $word_result; } echo ($wresult); Anyone see why when I run through each part of the

RE: [PHP] string concatenation from array

2003-08-14 Thread Matt Giddings
PROTECTED] Subject: [PHP] string concatenation from array I'm having a bit of difficulty getting a string to attach to itself from an array. Here is the bit of code I'm working on. $wresult = ; foreach ($search_string as $word_result){ $wresult = $wresult $word_result; } echo

Re: [PHP] string concatenation from array

2003-08-14 Thread Peter James
, 2003 2:00 PM Subject: RE: [PHP] string concatenation from array Use the . concatenation operator. : ) $wresult = ; foreach ($search_string as $word_result) { $wresult = $wresult . . $word_result; } echo $wresult; Matt -Original Message- From: Micah Montoy [mailto