Jump to content

dom document


Destramic

Recommended Posts

im using dom to tidy up my html but i wondering is there a way to format my html like so

<dl>
     <dd>
            <label>Condition :</label>
            <select name="condition"><option value="New">New</option>
      </dd>
</dl>

insead of

<dl>
<dd>
<label>Condition :</label>
<select name="condition"><option value="New">New</option>
</dd>
</dl>

here is the php im using

$dom = new DOMDocument();
$dom->loadHTML($this->_body);
$dom->formatOutput = true;
echo $dom->saveHTML();

thank you

Link to comment
https://forums.phpfreaks.com/topic/291580-dom-document/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.