Foreach
PHP Code Examples
Here we are iterating over the values of an array.

4 2 1 42 11 -3 Thud

This is the way to do it. (7 words)

Here are all the _SERVER variables sent to the script:

USERapache
HOME/var/www
SCRIPT_NAME/~bennet/php/leccode/l2/p3.php
REQUEST_URI/~bennet/php/leccode/l2/p3.php
QUERY_STRING
REQUEST_METHODGET
SERVER_PROTOCOLHTTP/1.1
GATEWAY_INTERFACECGI/1.1
REMOTE_PORT53858
SCRIPT_FILENAME/var/www/homes/bennet/php/leccode/l2/p3.php
SERVER_ADMINroot@localhost
CONTEXT_DOCUMENT_ROOT/var/www/html
CONTEXT_PREFIX
REQUEST_SCHEMEhttp
DOCUMENT_ROOT/var/www/html
REMOTE_ADDR54.145.83.79
SERVER_PORT80
SERVER_ADDR10.27.0.23
SERVER_NAMEsandbox.mc.edu
SERVER_SOFTWAREApache/2.4.34 (Fedora)
SERVER_SIGNATURE
PATH/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin
HTTP_ACCEPT_ENCODINGgzip
HTTP_CONNECTIONKeep-Alive
HTTP_HOSTsandbox.mc.edu
HTTP_IF_MODIFIED_SINCEMon, 23 Jul 2018 15:13:34 GMT
HTTP_ACCEPTtext/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8
HTTP_USER_AGENTCCBot/2.0 (https://commoncrawl.org/faq/)
proxy-nokeepalive1
UNIQUE_IDW8ylZgogWmgt6uGrASlZLAAAAVU
FCGI_ROLERESPONDER
PHP_SELF/~bennet/php/leccode/l2/p3.php
REQUEST_TIME_FLOAT1540138342.548
REQUEST_TIME1540138342