Search found 19 matches
- 03 Jan 2024 16:51
- Forum: Script Exchange
- Topic: Append variable to an array ?
- Replies: 38
- Views: 293752
Re: Append variable to an array ?
Are you f*** serious? You've been told to activate "Syntax Checking". You didn't You've been told that $askusr will only contain one item, iterating over one item is... <no comment> And now you add another loop inside that ALSO loops over a single item??? No $i incrementation inside the l...
- 03 Jan 2024 15:51
- Forum: Script Exchange
- Topic: Append variable to an array ?
- Replies: 38
- Views: 293752
Re: Append variable to an array ?
A bit rich of you to ask what is going on here in your post #17 and question the helpfulness of long standing forum members who have helped countless users over the years. You post snippets of your code without any explanation what the variables at the start of your snippet contain and then expect ...
- 03 Jan 2024 05:05
- Forum: Script Exchange
- Topic: Append variable to an array ?
- Replies: 38
- Views: 293752
Re: Append variable to an array ?
My original question was to append a variable to an array. HighEnd mentioned to initiate the variable outside of the forEach loop, then within the forEach loop iterate over that variable. $i = 0; foreach($iten,$askusr){ $ccPath = listfolder($iten,input("Folder to Find",,,e,300,300),2,||); ...
- 01 Jan 2024 22:05
- Forum: Script Exchange
- Topic: Append variable to an array ?
- Replies: 38
- Views: 293752
Re: Append variable to an array ?
I have provided data in previous post; why post the same thing twice and what is wrong with some theory, nothing.
- 01 Jan 2024 17:12
- Forum: Script Exchange
- Topic: Append variable to an array ?
- Replies: 38
- Views: 293752
Re: Append variable to an array ?
Adding to an array is possible but it seems arrays can't contain subarrays... $i = 0; foreach($iten,$askusr){ $ccPath = listfolder($iten,input("Folder to Find",,,e,300,300),2,||); $pArray[$i] = $ccPath; $i += 1; } Are you sure this is how you iterate though an Array. I tried this and it s...
- 31 Dec 2023 16:03
- Forum: Script Exchange
- Topic: Append variable to an array ?
- Replies: 38
- Views: 293752
Re: Append variable to an array ?
No info about what $ccPath contains or the output of implode() looks like... Educated guess: No ","-delimited entries in the array => Hence not a correct index access... $i=0; is initialized outside of the forEach loop, within the forEach I have $i+=1 and $ccPath does show the list of fol...
- 31 Dec 2023 04:31
- Forum: Script Exchange
- Topic: Append variable to an array ?
- Replies: 38
- Views: 293752
Re: Append variable to an array ?
Code: Select all
$pArray[] = $ccPath
- 30 Dec 2023 03:58
- Forum: Script Exchange
- Topic: Append variable to an array ?
- Replies: 38
- Views: 293752
Re: Append variable to an array ?
I have a question why this line of code; the forth argument is suppose to show only the folders yet it is showing me whatever files I have as well ?
Code: Select all
$ccPath = listfolder($iten,input("Folder to Find",,,e,300,300),2,||);
- 29 Dec 2023 04:50
- Forum: Script Exchange
- Topic: Append variable to an array ?
- Replies: 38
- Views: 293752
Re: Append variable to an array ?
Turn on Menu - Scripting - [x] Syntax Checking You see garbage (and not the content of the array) because the implode() line is missing the trailing semicolon^^ Apart from that the whole script doesn't make sense - Looping over a single item ( $askusr does only contain (at max) one) - If there are ...
- 28 Dec 2023 03:31
- Forum: Script Exchange
- Topic: Append variable to an array ?
- Replies: 38
- Views: 293752
Re: Append variable to an array ?
I think I may know where the problem lies; although I do have another question the native variable <allitems> returns all the sub-folders for a selected folder in my case, except; how can I get just the folder omitting the path ?
- 27 Dec 2023 21:25
- Forum: Script Exchange
- Topic: Append variable to an array ?
- Replies: 38
- Views: 293752
Re: Append variable to an array ?
Maybe, just maybe... You read up the syntax of implode() ? The second parameter is the variable name of the list to map the array to. Does it make sense to use $i (the iterator) here?... Why is "||" used as the separator, you aren't even assigning $gPath to the array but a single folder n...
- 27 Dec 2023 17:15
- Forum: Script Exchange
- Topic: Append variable to an array ?
- Replies: 38
- Views: 293752
Re: Append variable to an array ?
You asked for the whole script, as to what may be wrong ?
- 27 Dec 2023 16:43
- Forum: Script Exchange
- Topic: Append variable to an array ?
- Replies: 38
- Views: 293752
Re: Append variable to an array ?
The script is not complete, I just wanted to know why I'm setting the implode() function in the printed output; doesn't make sense. I was hoping you would maybe know based on those lines of code. That is where the main problem exists; but if you want here is the whole code. $askusr = inputfolder(&qu...
- 27 Dec 2023 16:13
- Forum: Script Exchange
- Topic: Append variable to an array ?
- Replies: 38
- Views: 293752
Re: Append variable to an array ?
Well, you have not read enough. 1) What do you want to achieve? 2) Show not just one line out of context but something that's copy-and-pastable for testing. I want to show the list without the output showing the actual implode() function within the output. $i=0 foreach($iten,$askusr){ //$ccPath = l...
- 26 Dec 2023 02:28
- Forum: Reviews
- Topic: 5+ years of free updates
- Replies: 13
- Views: 446274
Re: 5+ years of free updates
XY is a flexible file manager compared to others.