- Author had a File in an Envato Bundle
- Author was Featured
- Beta Tester
- Bought between 10 and 49 items
- Exclusive Author
- Has been a member for 5-6 years
- Item was Featured
- Referred between 100 and 199 users
- Sold between 10 000 and 50 000 dollars
Need help from some ninja WP Guru…
Under my theme options I made a checkbox list of all my categories so that users can check to exclude from the header menu. It seems to work fine. However, when I don’t have any of them checked I get this warning on every page: Warning: implode() [function.implode]: Invalid arguments passed in /home/kramz/public_html/blog/wp-content/themes/blognfolio/header.php on line 38
Warning: implode() [function.implode]: Invalid arguments passed in /home/kramz/public_html/blog/wp-content/themes/blognfolio/header.php on line 43
line 38$exclude = implode (",".$bnf_exc_cat);line 43
$excludep = implode (",".$bnf_exc_pages);Any tips will be great. Thanks.
”,”.$bnf_exc_catDid you meen to do:
”,”,$bnf_exc_cat? You placed a . instead of a , ? That might be the error

It’s gonna asplode! er, implode! RUN !
Sorry, couldn’t resist.
- Author had a File in an Envato Bundle
- Author was Featured
- Beta Tester
- Bought between 10 and 49 items
- Exclusive Author
- Has been a member for 5-6 years
- Item was Featured
- Referred between 100 and 199 users
- Sold between 10 000 and 50 000 dollars
Thanks cy21, yes I meant to use a comma. The issue is that I receive a warning: implode() [function.implode]: but only when there has not been a selection made. Once a selection is made then everything works as should.
Thanks cy21, yes I meant to use a comma. The issue is that I receive a warning: implode() [function.implode]: but only when there has not been a selection made. Once a selection is made then everything works as should.
I’m not sure.. might be wrong on this.. but when a checkbox is not selected I think it returns a empty string.. so if you pass that empty string in a array might create a empty array and does not see the second variable as a valid argument or does not see it at all so it gives error…
Try to see what the $bnf_exc_cat variable has inside and if empty fill it with something or change the code.. put a if… you choose 
Does this work?
if ( $bnf_exc_cat )
$exclude = implode (",".$bnf_exc_cat);
Does this work?
if ( $bnf_exc_cat )
$exclude = implode (",".$bnf_exc_cat);
why is everybody putting a . instead of a , in implode between variables ? (lol)
- Author had a File in an Envato Bundle
- Author was Featured
- Beta Tester
- Bought between 10 and 49 items
- Exclusive Author
- Has been a member for 5-6 years
- Item was Featured
- Referred between 100 and 199 users
- Sold between 10 000 and 50 000 dollars
if ( $bnf_exc_cat )
$exclude = implode (",",$bnf_exc_cat);
Another thing is that when testing it locally there’s no warning at all. But, when uploading it to my hosting provider the warning comes out.
- Author had a File in an Envato Bundle
- Author was Featured
- Beta Tester
- Bought between 10 and 49 items
- Exclusive Author
- Has been a member for 5-6 years
- Item was Featured
- Referred between 100 and 199 users
- Sold between 10 000 and 50 000 dollars

Now I can go to sleep! I was killing myself. In case you’re wondering this is what I did:
$categorias = $bnf_exc_cat;
if ($categorias){
$categorias_exc= implode(",",$categorias);
} else {
$categorias_exc="";
}
I assume this was because it was attempting to implode ‘nothing’.
Cheers!
Does this work?why is everybody putting a . instead of a , in implode between variables ? (lol)if ( $bnf_exc_cat ) $exclude = implode (",".$bnf_exc_cat);
Just took the code from the first post 
@ kramz, good you made it work!
