(PHP 5, PHP 7, PHP 8)
tidyNode::isText — Checks if a node represents text (no markup)
Tells if the node represents a text (without any markup).
Diese Funktion besitzt keine Parameter.
Beispiel #1 Extract text from a mixed HTML document
<?php
$html = <<< HTML
<html><head>
<?php echo '<title>title</title>'; ?>
<#
alert('Hello World');
#>
</head>
<body>
<?php
Das oben gezeigte Beispiel erzeugt folgende Ausgabe:
# text node #1 Hello World # text node #2 Outside HTML