tidyNode::getPreviousSibling

Returns the previous sibling node of the current node

&reftitle.description; public ``tidyNode``null```tidyNode::getPreviousSibling`

Returns the previous sibling node of the current node.

&reftitle.parameters; &no.function.parameters;
&reftitle.returnvalues;

Returns a `tidyNode` if the node has a previous sibling, or &null; otherwise.

&reftitle.examples;

### `tidyNode::getPreviousSibling` example

    <?php

    $html = <<< HTML
    <html>
     <head>
     </head>
     <body>
      <p>Hello</p><p>World</p>
     </body>
    </html>

    HTML;

    $tidy = tidy_parse_string($html);

    $node = $tidy->body();
    var_dump($node->child[1]->getPreviousSibling()->value);

    ?>

&example.outputs;

    string(13) "<p>Hello</p>
    "

&reftitle.seealso;

- `tidyNode::getParent`
- `tidyNode::getNextSibling`