RE: [PHP] Globals or Super Global Variables To Be Reused from For Loops

2008-11-06 Thread Alice Wei
>The last $string3 echo only gives me regions.name > > LIKE '%Detroit' according to the current construct and not regions.name > > LIKE '%47406' OR regions.name LIKE '%Detroit'. Is there something else I > > should do to have it give me

Re: [PHP] Globals or Super Global Variables To Be Reused from For Loops

2008-11-06 Thread Jim Lucas
es me regions.name > LIKE '%Detroit' according to the current construct and not regions.name > LIKE '%47406' OR regions.name LIKE '%Detroit'. Is there something else I > should do to have it give me the same output as the echo $string3 as I have > had aft

RE: [PHP] Globals or Super Global Variables To Be Reused from For Loops

2008-11-06 Thread Alice Wei
utput as the echo $string3 as I have had after the second to last curly brace? Thanks again for your help. Alice > Date: Thu, 6 Nov 2008 10:22:44 -0500 > From: [EMAIL PROTECTED] > To: [EMAIL PROTECTED] > CC: php-general@lists.php.net > Subject: Re: [PHP] Globals or Super

Re: [PHP] Globals or Super Global Variables To Be Reused from For Loops

2008-11-06 Thread Bastien Koert
[snip] [/snip] Alice, The big problem here is that you are resetting the $string3 variable in the loop for ($j=0; $j<$count_chunk2; $j++) { $string3= $stringChunk2[$j];// <<<-- resetting the value if ($j <$count_chunk_2) { $string2= " OR "; $

[PHP] Globals or Super Global Variables To Be Reused from For Loops

2008-11-06 Thread Alice Wei
Hi, I have a snippet of code as shown in the following: $message2="47406|Detroit"; $stringChunk2= explode("|", $message2); if ($message2!="") { $count_chunk2= count($stringChunk2); $count_chunk_2= $count_chunk2-1; } for ($j=0; $j<$count_chunk2; $j++) { $string3= $stringCh