abazoskib Posted July 30, 2009 Share Posted July 30, 2009 if(!empty($duplicate)) { //check if there are any dupes $duplicateString = "'"; $splitter = "','"; $duplicateString .= implode ($splitter,$duplicate); $duplicateString .= "'"; } this produces: PHP Warning: implode(): Invalid arguments passed in /usr/xxxx.php on line 236 anyone see the problem? Link to comment https://forums.phpfreaks.com/topic/168100-solved-implode-error/ Share on other sites More sharing options...
fooDigi Posted July 30, 2009 Share Posted July 30, 2009 what is $duplicate? could you post the code at least where this is set? Link to comment https://forums.phpfreaks.com/topic/168100-solved-implode-error/#findComment-886610 Share on other sites More sharing options...
abazoskib Posted July 30, 2009 Author Share Posted July 30, 2009 its an array of strings, but regardless, if its empty, it wouldn't even get this far. Link to comment https://forums.phpfreaks.com/topic/168100-solved-implode-error/#findComment-886794 Share on other sites More sharing options...
phpSensei Posted July 30, 2009 Share Posted July 30, 2009 try print_r($duplicate) first and tell us the output. Another thing is try making the splitter "," just that. Link to comment https://forums.phpfreaks.com/topic/168100-solved-implode-error/#findComment-886797 Share on other sites More sharing options...
abazoskib Posted July 30, 2009 Author Share Posted July 30, 2009 thanks to grep, i found that i had used the same variable name somewhere else. i knew i should have gone to sleep. thanks for the help everyone. Link to comment https://forums.phpfreaks.com/topic/168100-solved-implode-error/#findComment-886807 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.