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

java - Intellij Synchronizing output directories .. -

git - Initial Commit: "fatal: could not create leading directories of ..." -