Hi Guys,
I’m trying to develop a suite of snippets to make it easy for clients to post new content from the web. I’m doing well it seems, but there’s a select box i use that lets them select related articles. However, when I name the selectbox with the [] at the end, I get a parse error:
PHP error debug
Error: htmlspecialchars() expects parameter 1 to be string, array given
Error type/ Nr.: Warning - 2
File: /home/www/orangesparkleball.com/manager/includes/document.parser.class.inc.php(769) : eval()'d code
Line: 155
When I take off the brackets from the field name, the error stops, but I only get one value from the select box, instead of all selected options.
I’m grateful for any help.
The code I use is very simple:
$related = implode(',',$_POST['related_articles']);
Thanks!
Eric