Changeset View
Changeset View
Standalone View
Standalone View
includes/classes/class_faq.inc
Show First 20 Lines • Show All 71 Lines • ▼ Show 20 Line(s) | 70 | { | |||
---|---|---|---|---|---|
72 | var $answer; | 72 | var $answer; | ||
73 | var $anchor; | 73 | var $anchor; | ||
74 | 74 | | |||
75 | function Question($question, $answer, $anchor = "") | 75 | function Question($question, $answer, $anchor = "") | ||
76 | { | 76 | { | ||
77 | $this->question = $question; | 77 | $this->question = $question; | ||
78 | $this->answer = $answer; | 78 | $this->answer = $answer; | ||
79 | if ($anchor == "") | 79 | if ($anchor == "") | ||
80 | $this->anchor = ereg_replace("[^a-zA-Z]", "", $this->question); | 80 | $this->anchor = preg_replace("/[^a-zA-Z]/", "", $this->question); | ||
81 | else | 81 | else | ||
82 | $this->anchor = $anchor; | 82 | $this->anchor = $anchor; | ||
83 | } | 83 | } | ||
84 | 84 | | |||
85 | function showQuestion() | 85 | function showQuestion() | ||
86 | { | 86 | { | ||
87 | print "<li><a href=\"#$this->anchor\">$this->question</a></li>\n"; | 87 | print "<li><a href=\"#$this->anchor\">$this->question</a></li>\n"; | ||
88 | } | 88 | } | ||
Show All 39 Lines |