いくつかの背景のために、私はテンプレートスパークでcodeigniterを使用しています。
だから私のコントローラーには次の機能があります
public function information()
{
$this->load->library('session');
$developer_id = $this->session->userdata('developer_id');
$this->load->model("Developer_model");
$information = $this->Developer_model->get_developer($developer_id);
$this->template->set('information', (array) $information);
$this->template->build('dashboard/information');
}
私の見解では、私はそのように反響しています
<?php echo $information['email']; ?>
なんらかの理由で「メッセージ:未定義のインデックス:メール」が返ってきます
これは私の最初の質問なので、はっきりしないことを願っていますが、基本的にはデータベースから$ informationを取得し、一連のアイテムの1つにすぎない電子メールをエコーアウトしようとしています。
$ informationをvar_dumpすると、次のようになります。
object(stdClass)#21 (2) { ["timestamp"]=> int(1353444880991) ["result"]=> object(stdClass)#22 (3) { ["email"]=> string(21) "anothertest@gmail.com" ["api_key"]=> string(64) "de0f57acfc018882841b3255e89da11cb238160e84a66fe5b45bda8c51137c72" } }
助けてくれてありがとう、その前の2か月間だけcodeigniterで作業していて、文字通り、いくつかの本当にマイナーなhtmlナンセンス以外にコーディングをしていません。