On Tue, Nov 4, 2014 at 2:37 PM, Christoph Becker <cmbecker69@xxxxxx> 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] <https://wiki.php.net/rfc/isset_ternary> > 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