Associative array call with a math expression inside doublequotes vs singlequotes
-
admin
- Site Admin
- Posts: 66094
- Joined: 22 May 2004 16:48
- Location: Win8.1, Win10, Win11, all @100%
- Contact:
Re: Associative array call with a math expression inside doublequotes vs singlequotes
Yes, I think that's expected for sorting by Index.
But here's an idea: What about secondary sort by Index descending!? This can even be stored in Folder View Settings. Forget it, it just works when sorting by Type or Ext.
FAQ | XY News RSS | XY X
-
admin
- Site Admin
- Posts: 66094
- Joined: 22 May 2004 16:48
- Location: Win8.1, Win10, Win11, all @100%
- Contact:
Re: Associative array call with a math expression inside doublequotes vs singlequotes
Well, maybe I did it. Try next beta...
FAQ | XY News RSS | XY X
-
admin
- Site Admin
- Posts: 66094
- Joined: 22 May 2004 16:48
- Location: Win8.1, Win10, Win11, all @100%
- Contact:
Re: Associative array call with a math expression inside doublequotes vs singlequotes
@Brano:
In your foreach loop also quote the index here:
Otherwise you get problems with folders called "20240712" (high numbers).
But, of course, the script is very inefficient anyway. Check out
In your foreach loop also quote the index here:
Code: Select all
$a[quote($i)] = $counter;But, of course, the script is very inefficient anyway. Check out
<cc_index> in the next beta.FAQ | XY News RSS | XY X
-
Brano
- Posts: 38
- Joined: 08 Jul 2024 11:52
Re: Associative array call with a math expression inside doublequotes vs singlequotes
Wow, great news! :-) Thanks.
-
Brano
- Posts: 38
- Joined: 08 Jul 2024 11:52
Re: Associative array call with a math expression inside doublequotes vs singlequotes
Ahh...ok, I see now how it works. It cannot be subtracted from the subfolder count. It was just my testing directory that way. But nevertheless, with the <cc_index> it works. I am using just
<cc_index> and
-<cc_index>
The numbers are not sequential but that is just a cosmetic.
-
admin
- Site Admin
- Posts: 66094
- Joined: 22 May 2004 16:48
- Location: Win8.1, Win10, Win11, all @100%
- Contact:
Re: Associative array call with a math expression inside doublequotes vs singlequotes
So the speed is there now?
FAQ | XY News RSS | XY X
-
Brano
- Posts: 38
- Joined: 08 Jul 2024 11:52
Re: Associative array call with a math expression inside doublequotes vs singlequotes
Yes, I haven't noticed any lag with 1000 subfolders. Thanks.
XYplorer Beta Club