On Tue, Nov 4, 2014 at 2:37 PM, Christoph Becker wrote: > Then you might consider using the following: > > $index = isset($_SERVER['DOCUMENT_ROOT']) > ? $_SERVER['DOCUMENT_ROOT'] : 0; > do_something_with($connection_details[$index]); > > BTW: after upgrading to PHP 7 you could use the null coalesce operator[1]: > > $index = $_SERVER['DOCUMENT_ROOT'] ?? 0; > > [1] > Thank you. -- Dotan Cohen http://gibberish.co.il http://what-is-what.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php