Last active
August 27, 2015 11:17
-
-
Save chrisshennan/5ff23139bdbe7fcd11a1 to your computer and use it in GitHub Desktop.
Generating a title with or without a tag
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
function generateLabelContent($includeHref = true) { | |
if($includeHref) { | |
$content = '<a href="http://www.google.co.uk">Google</a>'; | |
} else { | |
$content = "Google"; | |
} | |
return $content; | |
} | |
echo generateLabelContent(true) . "<br/>"; | |
echo generateLabelContent(false) . "<br/>"; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment