Skip to main content

All Questions

1 vote
1 answer
812 views

Exclude directories & files from RecursiveDirectoryIterator

I'm trying to ZIP a folder and all its files and subfolder EXCEPT some files and folders. I have an array of files and folders to exclude. Works for the files, but folders in the exclude array are ...
Jerome Boccon-Gibod's user avatar
1 vote
1 answer
186 views

Get names of parents recursively

I have a database that looks like this: CREATE TABLE Persons ( id int, parentID int, name varchar(255) ); INSERT INTO Persons (id, parentID, name) VALUES ('1', '0', 'smith'); INSERT INTO ...
Shitpost12's user avatar
0 votes
1 answer
307 views

How to get the last level of elements from tree-like data structure in php?

My recursive function returns all the children of menu but I want to have just the last children of array, here is my code: function test($pid){ $arr = array(); $sql = "SELECT * FROM ...
Dura's user avatar
  • 5
0 votes
1 answer
245 views

Get Array values from Recursive function using php

I am trying to find out the parents of a new member till root. For this, I have written a recursive function in PHP that is expected to work, but results are not as expected. $parlist=array(); ...
ITSagar's user avatar
  • 703
0 votes
1 answer
93 views

PHP Recursive data

Good day, I hope somebody can help me with this... I am working on a system where you capture and load test codes, some of the test codes can be group codes and the group codes can contain group ...
Willem Pretorius's user avatar
1 vote
2 answers
1k views

Menu from mysql db to ul li (PHP)

I have a mysql table (menu) looking like this id (int) subid (int) name (varchar) subid is 0 if it is top level menu point, and if it is sub, then it get the id from the one above Data could be 1, ...
Mik2000dk's user avatar
-2 votes
1 answer
107 views

Recursive SQL consult PHP

I'm trying to do a recursive sql query, searching for all the children of a father and the children of that children, and so on.. The problem with the code below is that it only retrieves the first ...
Bryan Villafañe's user avatar
0 votes
1 answer
406 views

Recursive array correct method of display

Sorry guys back again with my recursive array which does work but I cannot get the "layout" right what I am after is a "proper" tree structure using <ul>,<li> so you end up like this: Item ...
Russell Parrott's user avatar