¡@

Home 

php Programming Glossary: nodelist

Extract form fields using RegEx

http://stackoverflow.com/questions/1274020/extract-form-fields-using-regex

yep not necessarily valid html... xpath new DOMXpath dom nodeList xpath query ' input @name q ' if nodeList length 0 for i 0 i.. new DOMXpath dom nodeList xpath query ' input @name q ' if nodeList length 0 for i 0 i nodeList length i node nodeList item i var_dump.. query ' input @name q ' if nodeList length 0 for i 0 i nodeList length i node nodeList item i var_dump node getAttribute 'value'..

Recursive categories with a single query?

http://stackoverflow.com/questions/3116330/recursive-categories-with-a-single-query

simply build the tree in PHP using some clever references. nodeList array tree array query mysql_query SELECT category_id name parent.. ORDER BY parent while row mysql_fetch_assoc query nodeList row 'category_id' array_merge row array 'children' array mysql_free_result.. row array 'children' array mysql_free_result query foreach nodeList as nodeId node if node 'parent' array_key_exists node 'parent'..

How do I remove a specific node using its attribute value in PHP XML Dom?

http://stackoverflow.com/questions/457153/how-do-i-remove-a-specific-node-using-its-attribute-value-in-php-xml-dom

DOMDocument xmlDoc load myXML xpath new DOMXpath xmlDoc nodeList xpath query ' category @id '. int id.' ' if nodeList length.. nodeList xpath query ' category @id '. int id.' ' if nodeList length node nodeList item 0 node parentNode removeChild node.. query ' category @id '. int id.' ' if nodeList length node nodeList item 0 node parentNode removeChild node xmlDoc save myXML test..