I need to get the substring before needle, so according to the PHP manual the function strstr should work for me, however from some reasons it does not
$page = strstr($page2, $prod_close, true);
The function without third argument is working fine. Debuging with the Eclipse I am getting the warning: "Wrong parameter count for strstr()". I know that the full strstr functionality is available only from version 5.3 - I triple-checked php on my server which is 5.3.27. So, what is wrong here?
For the time being I am using substr instead:
$page = substr($page2, 0, strpos($page2,$prod_close);
but strstr is a little bit faster I do belive.