db
返された結果を配列に代入しようとしています
私は持っている
$results = Db::get('get_items', array('id' =>$id));
$Info['items'][1]['title'] = $results[0]['Name'];
$Info['items'][1]['name'] = $results[0]['Filename'];
$Info['items'][1]['type'] = $results[0]['Type];
DB は 1 行のデータのみを返します。
$info
次のようなルックスが必要です
Array
(
[items] => Array
(
[1] => Array
(
[title] => Title test
[filename] => test.xml
[type] => company
)
)
[mis] => data
)
それらすべて$info
だけでなく、値を割り当てるより良い方法があるかどうか疑問に思っていました。hardcoded
どうもありがとう!