Source Code:
(back to article)
<?php /** * @var array[string] $options An array of strings as options for the function. */ $options = ["Option 1", "Option 2", "Option 3"]; /** * Function to output the contents of the $options array. */ function outputOptions() { global $options; foreach ($options as $option) { echo $option . "\n"; } } outputOptions(); ?>
Result:
Report an issue