0

For example; in PHP the auto-global $_SERVER. How do I display the elements or keys that it has?

I am unable to find out how online.

3 Answers 3

1
$keys = array_keys($somearray);

Is that what you're looking for? Or are you just looking for $somearray['somekey']?

Sign up to request clarification or add additional context in comments.

Comments

0

For debugging I assume?

There are a couple ways, but I always do something like this:

die(print_r($_SERVER));

Comments

0

Look into var_dump() and print_r. Both options should provide what you're looking for without having additional clarification for your request.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.