Help with "foreach"?

Discuss and share scripts and script files...
Post Reply
Mesh
Posts: 956
Joined: 24 Mar 2008 21:22

Help with "foreach"?

Post by Mesh »

Can someone give me a coding example of how "foreach" would be used to cycle through a list of selected items, acting on each of them in turn? The examples in the change log use random strings, which doesn't help me. :)

admin
Site Admin
Posts: 66249
Joined: 22 May 2004 16:48
Location: Win8.1, Win10, Win11, all @100%
Contact:

Re: Help with "foreach"?

Post by admin »

Example 3 in the change log shows it:

Code: Select all

        // selected list items
          foreach($token, <get selecteditemspathnames |>) {
            echo $token;
          }

Mesh
Posts: 956
Joined: 24 Mar 2008 21:22

Re: Help with "foreach"?

Post by Mesh »

I must have glossed over it, I'm sorry.

Thanks, Don!

Post Reply