I am reading the values from a text file that hold the connect parameters to connect to Mysql Server.
The content of the file is: localhost user password databaseName
I read the file and put the file and out the values into an array.
I then try to connect to the database using the following:
$connParams = $this->databaseConfigArray;
$connection = mysqli_connect($connParams[0], $connParams[1], $connParams[2], $connParams[3]);
This connection always fails. I debug and see that the strings in the array are correct and I can hard code the values and everything works fine.
Can someone tell me why the Array values don't work?
Thanks in advance