線上書籍

Home

[1042] XOOPS模組開發進階

<?php include "header.php"; //$_GET['term'] $sql = "select `name` from " . $xoopsDB->prefix("phone_book") . " where `name` like '%{$_GET['term']}%'"; $result = $xoopsDB->queryF($sql); while(list($name) = $xoopsDB->fetchRow($result)){ $arr[]=$name; } echo json_encode($arr);