0
我需要一些關於PHP輸出的幫助。其實我試圖顯示一條消息,但作爲回報,它顯示頁面上的多條消息。PHP輸出消息
OUTPUT: 這裏有一些questionsHere一些questionsHere一些questionsHere一些問題
這裏是我的代碼:見線#2
function sc_wptabtitle($atts, $content = null) {
echo '<span class="acbar">Here are some questions</span>';
extract(shortcode_atts(array(
'header' => 'h3',
'hclass' => 'wp-tab-title',
'label' => 'text',
'image_size'=> '24,24',
'_id' => false,
'load' => '',
'post' => '',
'page' => '',
'cat' => '',
'category_name' => '',
'tag' => '',
'tag_name' => '',
'number' => '4',
'exclude' => '',
'tag' => '',
'feed' => '',
'hide' => "false",
'elength' => $this->options['excerpt_length'],
'before_post' => '',
'after_post' => '',
'template' => '1',
'icon' => false
), $atts));
global $wpui_id_remove_chars;
if (str_ireplace($wpui_id_remove_chars, '', $_id) != $_id)
$_id = false;
$tmpl = (isset($this->options[ 'post_template_' . $template ])) ?
$this->options[ 'post_template_' . $template ] :
$this->options[ 'post_template_1' ];
if (isset($this->options[ 'title_template' ]) && $this->options[ 'title_template' ] != '') {
$title_template = $this->options[ 'title_template' ];
if ($_id) {
$title_template = str_ireplace('>{$title}', 'id="' . $_id . '">{$title}', $title_template);
}
} else {
$title_template = '<' . $header;
$title_template .= ' class="' . $hclass . '"';
if ($_id) {
$title_template .= ' id="' . $_id . '"';
}
$title_template .= '>{$title}</' . $header . '>';
}
任何猜測爲什麼它在輸出頁面上顯示多條消息/文本行?
非常感謝你提前
是的,我知道,但是有什麼辦法可以讓它在輸出頁面上只顯示一條消息嗎? – user3088482