Thank you for your reply... I'm able to connect database without any problem... my problem is
1. read tnsentry file (tnsfile.txt)
2. Search for db alias (SID = db1 , SID = db2 etc)
3. Store each db alias temporary into array
4. Use each alias for db connection in $dbConnect function
I can read the file but extracting distinct db alias and use them for connection is the challenge for me.