我当前收到以下错误:
Warning: explode() expects parameter 2 to be string, object given in D:\\...\\portfolio.php on line 12
这是我的portofolio。php:
<?php
$current = get_the_category();
$current_id= $current[0] ->cat_ID;
$categs_list = get_category_parents($current_id);
$pieces = explode("/", $categs_list); //this is line 12.
$category_name = strtolower($pieces[0]);
$categs = get_cat_id($category_name);
?>
有什么想法吗?PHP不是我的强项。