Please kindly advise! Waiting online! In this case, I want to call a php file on an html page. below is the method in my php file:
// Categories of special lectures
$ SQL = "select id, subjectname, grouptypeid from '# @__ sksubject' where parentid = 0 and status = 1 ";
$ Dsql-> SetQuery ($ SQL );
$ Dsql-> Execute ();
Print_r ($ dsql );
While ($ row = $ dsql-> GetArray ())
{
If ($ subjectid = $ row ['id']) {
$ Subjectname = $ row ['subjectname'];
}
$ Subarr [] = array (
'Id' => $ row ['id'],
'Subobjectname' => $ row ['subobjectname'],
);
}
I don't know how to write php code on the html page. I think it should be a foreach loop. what should I do if you give me some advice? It is best to provide me with the code, because I do not know how to call the methods in the PHP file on the html page .... Tears!
Reply to discussion (solution)
What do you get in the $ subarr array? I have to post it to see it?
Otherwise, how can I write code for you?
I am print_r ($ sunarr );
DedeSql Object ([linkID] => Resource id #36 [dbHost] => localhost [dbUser] => root [dbPwd] => 12345 [dbName] => dujiaoshou [dbPrefix] => djs _ [result] => Array ([me] =>) [queryString] => select id, subjectname, grouptypeid from 'DJs _ sksubobject' where parentid = 0 and status = 1 [parameters] => [isClose] => [safeCheck] => 1 [showError] => [recordLog] => [isInit] => 1 [pconnect] =>)
What's going on?
What do you get in the $ subarr array? I have to post it to see it?
Otherwise, how can I write code for you?
I am print_r ($ sunarr );
DedeSql Object ([linkID] => Resource id #36 [dbHost] => localhost [dbUser] => root [dbPwd] => 12345 [dbName] => dujiaoshou [dbPrefix] => djs _ [result] => Array ([me] =>) [queryString] => select id, subjectname, grouptypeid from 'DJs _ sksubobject' where parentid = 0 and status = 1 [parameters] => [isClose] => [safeCheck] => 1 [showError] => [recordLog] => [isInit] => 1 [pconnect] =>)
What's going on?
What do you get in the $ subarr array? I have to post it to see it?
Otherwise, how can I write code for you?
Okay, I am wrong. I don't know how to output $ subarr .....