Skip to content

Instantly share code, notes, and snippets.

@bentleyo
Last active February 2, 2017 06:21
Show Gist options
  • Save bentleyo/0775893c15ee8c53b45fd63d7a001be9 to your computer and use it in GitHub Desktop.
Save bentleyo/0775893c15ee8c53b45fd63d7a001be9 to your computer and use it in GitHub Desktop.
Minor Inconvenience Man Button
<?php
class TheButtonOnTheHomePage {
protected $html;
public function generateTheHtmlForTheButton() {
// <a href="#content">The Button</a>
$this->html = implode('', array(
0 => '<',
1 => 'a',
2 => ' ',
3 => 'h',
4 => 'r',
5 => 'e',
6 => 'f',
7 => '=',
8 => '"',
9 => '#',
10 => 'c',
11 => 'o',
12 => 'n',
13 => 't',
14 => 'e',
15 => 'n',
16 => 't',
17 => '"',
18 => '>',
19 => 'T',
20 => 'h',
21 => 'e',
22 => ' ',
23 => 'B',
24 => 'u',
25 => 't',
26 => 't',
27 => 'o',
28 => 'n',
29 => '<',
30 => '/',
31 => 'a',
32 => '>'
));
}
public function outputTheButtonHtml() {
echo $this->html;
}
}
$button = new TheButtonOnTheHomePage();
$button->generateTheHtmlForTheButton();
$button->outputTheButtonHtml();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment