xml - PHP DOMNode insertAfter? -


i bit stuck on how reorder nodes. trying add 2 simple "move item up" , "move item down" functions. while insertbefore() want move sibling before preceding one, easiest way move 1 node down in dom? appreciated!

code example:

 try {         $li->parentnode->insertbefore( $ul, $li->nextsibling);  } catch(\exception $e){         $li->parentnode->appendchild( $ul );  } 

Comments

Popular posts from this blog

How to access named pipes using JavaScript in Firefox add-on? -

multithreading - OPAL (Open Phone Abstraction Library) Transport not terminated when reattaching thread? -

node.js - req param returns an empty array -