Is element empty / has child function
-
Hello,
I’m looking for a function that checks if the element has any child (element inside element).Structure XML:
<sizes> <size>S</size> <size>L</size> </sizes>
So, basically I just want to check if <sizes> has <size> inside.
I’ve tried function below, but with no results:
function is_element_empty($element) { if(empty($element)) { return "This element is empty."; } else { return "This element is not empty!"; } }
Thank you in advance
Viewing 3 replies - 1 through 3 (of 3 total)
Viewing 3 replies - 1 through 3 (of 3 total)
- The topic ‘Is element empty / has child function’ is closed to new replies.