Senkerik Posted June 8, 2009 Share Posted June 8, 2009 I don't understand how to fix this I asked once already sorry. Warning: implode() [function.implode]: Invalid arguments passed in /home/ceasedfa/public_html/readchat.php on line 35 <?php include ('global.config.php'); include ('include/class.core.php'); $CeasedFate = new Core(); $CeasedFate->connectDB($SQL_host,$SQL_user,$SQL_pass,$SQL_db); $CeasedFate->stripPost(); $CeasedFate->stripGet(); $CeasedFate->is_logged($_SESSION['username'],$_SESSION['uid']); $d = $CeasedFate->detail('users','ignore_list','username=\''.$_SESSION['username'].'\''); $list = explode('|',$d['ignore_list']); $filename = $ChatFile; $handle = fopen($filename, "r"); $contents = @fread($handle, filesize($filename)); $newc =explode('<br>',$contents); foreach($newc as $cnew){ if($x<=25){ $temp_= ereg_replace('<span id="time_'.$_SESSION['username'].'" style="visibility:hidden;">',' <span style="visibility:visible;color:#ffccff;font-size:14px;font-family:arial;">',$cnew); $temp_= ereg_replace('<span id="'.$_SESSION['username'].'" style="display:none;">',' <span class="private">',$temp_); $temp_= ereg_replace('<span id="'.$_SESSION['username'].'" style="display:none;">','<span class="private">',$temp_); if(count($list)>0){ foreach($list as $ignore){ if (strlen(trim($ignore))>0){ $temp_= ereg_replace('<span id="ign_'.$ignore.'">',"<span style='display:none;'>",$temp_); } } } $newcc[]=$temp_; } $x++; } $newcc=implode('<br>',$newcc); echo $newcc; fclose($handle); ?> Wanna make a few bucks? PHP/SQL programmer needed Contact me for a job Link to comment https://forums.phpfreaks.com/topic/161434-warning-implode-functionimplode/ Share on other sites More sharing options...
Adam Posted June 8, 2009 Share Posted June 8, 2009 I don't think $newcc is an array, which suggests the script's not getting to: $newcc[]=$temp_; Add some debugging within each of the 'foreach' and 'if' braces one by one till you find where the script stops. Link to comment https://forums.phpfreaks.com/topic/161434-warning-implode-functionimplode/#findComment-851927 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.