I'm using php simple dom
I'm trying to clean up an array prior to a foreach loop, my code so far:
$html = file_get_html('test/php/refs.calendar.html');
$links = array();
foreach ($html->find('ul') as $ul) {
$links[] = $ul->plaintext ;
}
echo '<pre>',print_r($links, 1),'</pre>';
prints out:
Array
(
[0] => bla bla
[1] => more bla bla
[2] => some text
[3] => some more text
[4] => some more text
[5] => some more text
)
prior to foreach loop i tried:
$links[] = array_splice($html->find('ul'), 1, 2) ;
I would like to get rid of array1 and [2] before the loop, I think i'm getting objects and arrays in a twizzle, any ideas guys?