Hello! Dear community, help fill the array, something I'm probably stupid.
There is a cycle:
foreach($html->find('div.narrow_column div h2 a') as $element) { $nameNews = $element->innertext; $nameNews = iconv( "UTF-8", "windows-1251", $nameNews); }
QUESTION: How do I create an array of data filled with $ nameNews ?
Well, this kind of example:
$ nameNews - in this case, the new value when the loop passes
Array ( [0] => $nameNews [1] => $nameNews [3] => $nameNews )