嘿家伙我试图根据我选择的当前类别拉一个列表。我收到一个语法错误。我认为我有正确的想法,但我的执行是一个noob。在当前类别中遇到了一些麻烦,我的PHP语法
这是我想要做的。
<?php $current_category = '($detailRecord['category'])'; ?>
<?php
// load list records from 'blog_stories'
list($blog_storiesRecords, $blog_storiesMetaData) = getRecords(array(
'tableName' => 'blog_stories',
'limit' => '5',
'loadUploads' => false,
'allowSearch' => false,
'where' => "category = '$current_category'",
));
?>
它给了我这个错误。
解析错误:语法错误,在网上意外T_STRING 19
什么是第1行9?还有<?php $ current_category ='($ detailRecord ['category'])'; ?>我确信它应该是 <?php $ current_category = $ detailRecord ['category']; ?> – xlordt