Use find('text', $index)
to get all the text blocks, where $index
is the index of the wanted text...
So in this case, it's:
echo $html->find('text', 3);
// OUTPUT:
The third of four performances in the Society's Morning Melodies series features...
You can read more in the Manual
EDIT:
Here's a working code:
$input = '<div class="left">
Bla-bla..
<div class="float">Bla-bla...
</div><!--/end of div.float-->
<br />The third of four performances in the Society\'s Morning Melodies series features...<a href="index.php?page=tickets&month=20140201"><< Back to full event listing</a>
</div><!--/end of div.left-->';
//Create a DOM object
$html = new simple_html_dom();
// Load HTML from a string
$html->load($input);
// Using $index
echo $html->find('text', 3);
echo "<hr>";
// Or, it's the 3rd element starting from the end
$text = $html->find('text');
echo $text[count($text)-3];
// Clear DOM object
$html->clear();
unset($html);
// OUTPUT
The third of four performances in the Society's Morning Melodies series features...
The third of four performances in the Society's Morning Melodies series features...