| 
	
 | 
 Posted by J. Frank Parnell on 09/07/07 21:40 
On Fri, 07 Sep 2007 15:01:24 -0400, Jerry Stuckle <jstucklex@attglobal.net> 
wrote: 
 
>Jerry Stuckle wrote: 
>> J. Frank Parnell wrote: 
>>> On Fri, 07 Sep 2007 07:22:46 -0400, Jerry Stuckle  
>>> <jstucklex@attglobal.net> 
>>> wrote: 
>>> 
>>>> J. Frank Parnell wrote: 
>>>>> On Thu, 06 Sep 2007 21:41:27 -0400, Jerry Stuckle  
>>>>> <jstucklex@attglobal.net> 
>>>>> wrote: 
>>>>> 
>>>>>> J. Frank Parnell wrote: 
>>>>>>> Hello, 
>>> 
>> reset $array1; 
>> reset $array2; 
>>  
>> for (($val1 = each($array1)) || ($val2 = each($array2)) { 
>>   if ($val1) { // false if at the end 
>>     // $val1['key'] contains the key 
>>     // $val1['value'] contains the value 
>>     echo $val1['key'] . '=>' $val1['value']; 
>>   } 
>>   else 
>>     echo ' '; 
>>   if ($val2) { // false if at the end 
>>     // $val2['key'] contains the key 
>>     // $val2['value'] contains the value 
>>     echo $val2['key'] . '=>' $val2['value']; 
>>   } 
>>   else 
>>     echo ' '; 
>> } 
>>  
>>  
> 
>Sorry - that should be: 
> 
>for (($val1 = each($array1)) || ($val2 = each($array2))) { 
> 
>Missed an extra paren at the end. 
 
Thanks again for the help, however, I still get: 
Parse error: syntax error, unexpected ')', expecting ';' in 
/web/sites/asdf/asdf.com/_impexp/test.php on line 55 
 
Isnt there supposed to be 3 expressions in a FOR?  I tried with semicolons here 
and there, but couldnt get it.   
 
current code: 
 for (($val1 = each($users)) || ($val2 = each($newusers))) { 
   if ($val1) { // false if at the end 
     // $val1['key'] contains the key 
     // $val1['value'] contains the value 
     echo $val1['key'] . '=>' $val1['value']; 
   } 
   else 
     echo ' '; 
   if ($val2) { // false if at the end 
     // $val2['key'] contains the key 
     // $val2['value'] contains the value 
     echo $val2['key'] . '=>' $val2['value']; 
   } 
   else 
     echo ' '; 
}
 
  
Navigation:
[Reply to this message] 
 |