我试图在数组
中存储来自foreach循环的值$result_itemid = array();
foreach($resp->searchResult->item as $item) {
$itemid = $item->itemId;
$title = $item->title;
$result_itemid[] .= $itemid;
}
print_r($result_itemid);
我尝试它并且它有效:输出
[0] => 7048668,[1] => 5651831等..
但我想要更多选项:
[0] [0] => 7048668 [0] [1] =>黑色 - [1] [0] => 5651831 [1] [1] =>白
谢谢:)
答案 0 :(得分:0)
试试这个:
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !-s
RewriteRule ^(.*)$ api.php?rquest=$1 [QSA,NC,L]
RewriteCond %{REQUEST_FILENAME} -d
RewriteRule ^(.*)$ api.php [QSA,NC,L]
RewriteCond %{REQUEST_FILENAME} -s
RewriteRule ^(.*)$ api.php [QSA,NC,L]
</IfModule>