Reputation: 91
$this->Settings = array( "host" => $host , "user" => $user , "pass" => $pass );
$this->db = $db;
$this->Settings["name"] = ereg_replace ("_", "", $this->db);
$this->init();
I have an application that can't work after migrating to php 5.3 from php 5.2.
Even after i changed the ereg_replace line above to
$this->aSettings["name"] = preg_replace("/_/", "", $this->db);
It still doesn't get the settings from the db.
Upvotes: 1
Views: 337
Reputation: 173562
There's no particular reason why your preg_replace()
wouldn't work, but you could simply use str_replace()
instead.
$this->Settings['Name'] = str_replace('_', '', $this->db);
This statement interests me though:
$this->db = $db;
Where is $db
set? Follow that trail until you find where the real issue is,
Upvotes: 3