Use variable defined outside function
<?php $ilike = "Rock"; function music(){ echo "I love listening to $ilike music!", "\n"; } music(); ?>