Only the next level can be found based on the id passed from the front end.
浮尘2022-08-15 23:54:11
0
2
1117
'pid'=>$id can only be found at the next level, but it should not be found at the next level, because the $id passed is fixed, and the grandson level cannot be deleted based on the parent level
If there is a lower level, the value of id should be an array. Just delete it directly. Why should we delete the grandson level?
If $id is a grandson-level value, just traverse it directly and delete it if you find it