It's like this. One of my pages shows all the categories I want to hide some categories from not showing
I used the following code, but there's a place where I can't get any trouble.
if (! In_array ($term->slug, Array ())) {
$new _terms[] = $term;
}
I used this program to make some categories not show for example, I don't want to show the classification of slug value A as an array (' a ') you can
But I don't want to show a lot of things that need to be filtered from the database table.
$SHAIXUANKUWP _terms=mysql_query ("select * from ' wp_terms ' where term_id= '". $duqu _term_id. "");
This paragraph I screened out all the rows in the table I want to not show the classification
while ($DUQUSHUJUKUWP _terms=mysql_fetch_array ($SHAIXUANKUWP _terms)) {$duqu _slug= $duqushujukuwp _terms[slug];}
This paragraph of my line read out the classification of the Slug
It seems that the slug value read out every time will be replaced by a new read I'm not going to put the value in an array.
And it seems that array () can not be put in arrays only one
But I don't know how to put $duqu_slug this all in the above array ()
Could you help me see how to change it?
I'm a novice. Please explain it in more detail. Thank you, great God.
Reply to discussion (solution)
$duqu _slug[]= $DUQUSHUJUKUWP _terms[slug];
So the $duqu_slug is an array. Note Before initialization: $duqu _slug = Array ();
if (! In_array ($term->slug, $duqu _slug)) {
$new _terms[] = $term;
}
$duqu _slug[]= $DUQUSHUJUKUWP _terms[slug];
So the $duqu_slug is an array. Note Before initialization: $duqu _slug = Array ();
if (! In_array ($term->slug, $duqu _slug)) {
$new _terms[] = $term;
}
Thank you.