$data_rows = array();
$row = array(
0 => get_the_title(), //Post Title
1 => get_the_content(), //Post Content
2 => $image[0], //Post Featured Image
3 => get_the_date(), //Post Date
4 => get_the_author(), //Post Author
5 => $post_categories, //Post Category
6 => $post_tag, //Post Tags
7 => get_post_status(), //Post Status
);
$data_rows[] = $row;
现在这个数组中的格式一样取三列......
Title1 - Content1 - Image1 - Date1 - Author Name1 - Category1 - Tag1 - Status1
现在,我想删除单行数据项“
Title1
“,”Title2
“,”Title3
“通过使用key[0]
,该怎么做?
我也使用“unset()
”,但它并没有帮助。
是的,用过的也。 array_splice也只删除一行“标题”。这不是删除“标题1”和“标题2” –
@Mukiikumar你想删除什么?每个行的标题?或基于标题本身的行? –
来自每行的所有标题。 –