Source Code:
(back to article)
<?php // Function used for assigning new // value to $string variable and // printing it function print_string($string) { $string = "W3docs" . "\n"; // Print $string variable print $string; } // Driver code $string = "Global w3docs" . "\n"; print_string($string); print $string; ?>
Result:
Report an issue