Mercurial > hg > webaudioevaluationtool
comparison php/save.php @ 2637:68299f11d445
Loser checks on findNodeByAttribute
author | Nicholas Jillings <nicholas.jillings@mail.bcu.ac.uk> |
---|---|
date | Thu, 19 Jan 2017 13:07:43 +0000 |
parents | 8fc8d28d8e8e |
children | 82b6b75a91bc |
comparison
equal
deleted
inserted
replaced
2636:8fc8d28d8e8e | 2637:68299f11d445 |
---|---|
1 <?php | 1 <?php |
2 | 2 |
3 function findNodeByAttribute($nodeList, $attributeName, $attributeValue) { | 3 function findNodeByAttribute($nodeList, $attributeName, $attributeValue) { |
4 if (empty($attributeName) || empty($attributeValue) || empty($nodelist)) { | 4 if (empty($attributeName) || empty($attributeValue)) { |
5 die("Error: Empty findNodeByAttribute"); | 5 die("Error: Empty findNodeByAttribute"); |
6 } | 6 } |
7 | 7 |
8 foreach($nodeList as $item) { | 8 foreach($nodeList as $item) { |
9 if ($item->hasAttribute($attributeName)) { | 9 if ($item->hasAttribute($attributeName)) { |