I am new with PHP and i have a little problem.
How can I search with variable with simple html dom parser? My id is "ti" and there are several same named divs. I only need the first one. The code works if i put ti instead of $variable to code.
thanks!
<?php
$variable = "ti"
include_once 'simple_html_dom.php';
$html = file_get_html('http://myurl.here');
$ret = $html->find('div[id=$variable]', 0);
if ($ret) {
echo $ret->innertext;
}
?>