Stop array to string conversion warnings from PHP
Function ereg() is deprecated