Thread: A array problem
View Single Post
Old 08-10-2007   #4 (permalink)
Brandon Shell


 
 

Re: A array problem

p.s. Also... Im not entirely sure what your goal is by $a -le 8, but if you
just want to do it for each element in $b

foreach($element in $b)
{
"CN=$hn$element,OU=local,OU=roles,DC=cz,DC=int-e,DC=kaufland" -scope l
}
"Jens Diekers" <Jens Diekers@discussions.microsoft.com> wrote in message
news:2E8F00FF-EFD5-4874-982A-6635B4CC585F@microsoft.com...
> in this little command i want to access a element of a array: please look
>
> for ($a=0; $a -le 8; $a++) {dsadd group
> "CN=$hn$b[$a],OU=local,OU=roles,DC=cz,DC=int-e,DC=kaufland" -scope l
>
> The output of the defined variable $hn is ok, but when i want to access
> $b[$a] variable, the array will output his whole content. Do I have to
> mascerade my $b variable?
>
> Any help is welcome?
> THX


My System SpecsSystem Spec