我想获取字段descriptionID
和的值paragraphID
,但是代码根本看不到它们。text
同时,他完美地id
看到了田野。我不明白我做错了什么。请帮我找出错误!
P.S. 使用 RedBeanPHP;$texts
返回一个对象数组;$text
- 具有屏幕截图 1 中所示字段的对象
<?php
$texts = R::find(/* мой запрос (правильный) */);
$paragraphID = 2;
foreach($texts as $text){
echo($paragraphID." - paragraphID<br>");
echo($text->id." / ".$text['id']."<br>");
echo($text->descriptionID." / ".$text['descriptionID']."<br>");
echo($text->paragraphID." / ".$text['paragraphID']."<br>");
echo($text['text']." / ".$text->text);
$paragraphID++;
} ?>
屏幕截图 1:(phpMyAdmin 中的数据库)
屏幕截图 2:(浏览器中显示的内容)