FRIHOST FORUMS SEARCH FAQ TOS BLOGS COMPETITIONS
You are invited to Log in or Register a free Frihost Account!


Xtemplate - PHP Implode Code Error





maeglin20
First, My English is very bad..

This is error:

Code:
Warning: implode() [function.implode]: Bad arguments. in /home/maeglin2/domains/maeglin.frih.net/public_html/tpl/includes/_hbahce.php on line 43


This is _hbahce.php on line 37-45:

Code:
            $brk = array(
               'username' => $online_chars['name'],
               'link' => $nickcode,
               'bina' => $bina,
               'seviye' => $online_chars[seviye],
               'dead' => $dead,
               'zong' => implode(' | ', $brk),
            );
            $xtpl->assign('BRK',$brk);


This is Template Page:

Code:
{BRK.zong}
AOP Web Development
i don't know if what you trying to get but it might be because you implode the $brk which is not previously define as array, best way is instead of putting those try to separate this

Code:

'zong' => implode(' | ', $brk),

below on the first declration array

rvec
or just above the code you pasted add this:
Code:
$brk = isset($brk)?$brk:array();
maeglin20
Code:
            $brk = array(
               'username' => $online_chars['name'],
               'link' => $nickcode,
               'bina' => $bina,
               'seviye' => $online_chars[seviye],
               'dead' => $dead,
               'zong' => implode(' ', $nickcode),
            );
            $xtpl->assign('BRK',$brk);


I think real problem in php.ini..

Code:
Warning: implode() [function.implode]: Bad arguments. in /home/maeglin2/domains/maeglin.frih.net/public_html/tpl/includes/_hbahce.php on line 43
rvec
put that line I posted before the code and the problem will be solved. There is nothing wrong in php.ini
Related topics
Php, mime_content_type() problem
I need PHP hits code
Simple PHP forum code needed!
PHP include code problem
need some help - php switch code
[PHP] phpbb registration - add to other db
[PHP] Weird Errors and lost files.
PHP VS ASP
mySQL Query/PHP code - get the highest value...
Php code messed up. What's wrong?
Error messages and php editing in a photo archive (fixed?)
php dynamic graph code not working
PHP Fatal Error (Issue Resolved)
Getting Fatal Error in php mysqli
Reply to topic    Frihost Forum Index -> Scripting -> Php and MySQL

FRIHOST HOME | FAQ | TOS | ABOUT US | CONTACT US | SITE MAP
© 2005-2011 Frihost, forums powered by phpBB.