我有以下变量,需要在数组循环中使用它...
$jointa="'nike-score', 'pack-cupcake', 'shor-burgundy'";
foreach (array($jointa) as $id) {
$yourSiteContent[] = array('permalink' => $id, 'updated' => $dated);
}
但是当我将值直接放在数组循环中时,它的工作正常......
foreach (array('nike-score', 'pack-cupcake', 'shor-burgundy') as $id) {
$yourSiteContent[] = array('permalink' => $id, 'updated' => $dated);
}
请检查我在哪里做错了?