<?php
include("./datas/config.php");
$exclude = array("index.php");
$dir_links = realpath("./");
$dir = opendir($dir_links);
$files = array();
while (($file = readdir($dir)) !== false) {
if (!in_array($file, $exclude) && preg_match('/^(.+)\.php$/', $file, $match)) {
$files[] = $file;
}
}
closedir($dir);
shuffle($files);
for ($i = 0, $count = count($files); $i < 15 && $i < count($files); ++$i) {
$file = $files[$i];
$nicename = preg_replace('/(?<=.)([-])/', ' ', substr($file, 0, -4));
$nicename = ucwords($nicename);
$link = $rooturl.$file;
echo " <a href=\"".$link."\">$nicename</a>,";
}
?>
จากโค๊ต ผมสั่งให้สร้าง keyword มา 15คำ ที่นี้คำสุดท้ายมันจะมี , ติดมาด้วย ผมอยากลบออกจากคำสุดท้ายครับ
แล้วถ้าต้องการแทรก <td> เข้าไปทุกๆ keyword ที่5 ต้องเขียนโค๊ตประมาณไหนครับ (ผมเปิดหนังสือจนขาดเลย ยังทำไม่ได้ซักที

)
ขอบคุณมากครับ