จะแทรก tag cloud ที่เป็น php ใน html ได้ยังไงคะ

ตอนนี้ แยกการทำงานไว้ในไฟล์ "tag_cloud.php"

แต่ว่าจะนำมาแสดงผลในหน้า index ที่เป็น html ยังไงคะ

ลอง include php ใน html มันไม่ได้อ่ะ

************************************
โค้ดใน tag_cloud.php...

<?

function get_tag_data() {
$arr = Array('แว่นตา' => 35, 'กระเป๋า' => 22, 'Shopping' => 44, 'ฟรี' => 43,
'ความงาม' => 18, '' => 33, 'กีฬา' => 15, 'เครื่องสำอาง' => 11, 'รองเท้า' => 42,
'Online' => 13, 'เสื้อผ้า' => 34);
return $arr;
}

function get_tag_cloud() {
// Default font sizes
$min_font_size = 12;
$max_font_size = 30;
// Pull in tag data
$tags = get_tag_data();
$minimum_count = min(array_values($tags));
$maximum_count = max(array_values($tags));
$spread = $maximum_count - $minimum_count;
// modify by www.narongrit.net
if($spread == 0) {
$spread = 1;
}
$cloud_html = '';
$cloud_tags = array(); // create an array to hold tag code
foreach ($tags as $tag => $count) {
$size = $min_font_size + ($count - $minimum_count)
* ($max_font_size - $min_font_size) / $spread;
$cloud_tags[] = '<a style="font-size: '. floor($size) . 'px'
. '" class="tag_cloud" href="http://www.google.com/search?q=' . $tag
. '" title="' . $tag . '" returned a count of ' . $count . '">
'
. htmlspecialchars(stripslashes($tag)) . '</a>';
} //modify by www.narongrit.net
$cloud_html = join("|", $cloud_tags) . "";
return $cloud_html;}
?>

******************************************

รบกวนด้วยนะค้าาาา >.<'

29 ธ.ค. 2552 4 2,257

555+++

จะเอาไปใส่กับอะไรครับ ไม่บอกให้ละเอียด GCMS หรือเปล่า
#1

ไม่ค่อยเข้าใจ GCMS เท่าไหร่อ่ะค่ะ (-"-)

ถ้ามันหมายถึงว่ามี Ajax ในเว็บก็คงไม่ใช่
 
แต่คือจะเอาไว้โชว์ในหน้าแรก

พอ user เข้ามาเว็บไซต์เราก็โหลดขึ้นมาเลย

รบกวนอีกทีนะคะ
 

#2

อย่างง่ายสุดก็ใส่ iframe สิครับ จะได้ไม่ต้องแก้ไขอะไรมากนัก
#3

ได้แล้ว

ขอบคุณมากนะค้า

#4
ความคิดเห็น
ไฟล์อัปโหลด ชนิด jpg, jpeg ขนาดไฟล์ไม่เกิน 1024
^