ID: 39535 Updated by: [EMAIL PROTECTED] Reported By: mark at divinedesigns dot ca -Status: Open +Status: Bogus Bug Type: Variables related Operating System: linux PHP Version: 5.2.0 New Comment:
Sorry, but your problem does not imply a bug in PHP itself. For a list of more appropriate places to ask for help using PHP, please visit http://www.php.net/support.php as this bug system is not the appropriate forum for asking support questions. Due to the volume of reports we can not explain in detail here why your report is not a bug. The support channels will be able to provide an explanation for you. Thank you for your interest in PHP. Please use php-general@lists.php.net for such problems. Thank you. Previous Comments: ------------------------------------------------------------------------ [2006-11-16 16:30:53] mark at divinedesigns dot ca these functions work perfectly well when used on their own... but not so when combined... ------------------------------------------------------------------------ [2006-11-16 16:29:22] mark at divinedesigns dot ca <? function shownavs(){ global $allnavs, $blocknavs, $head, $autokey; if(isset($allnavs)){ $navsoutput .= '<table>'; foreach($allnavs as $group => $i){ $title = $group; foreach($i as $name => $link){ if(isset($link)){ $content .= '<br>'.$name; #this line usually has same issue, altered for bug report } } $text .= '<tr><td>'.set_collapse($title,$content,$group).'</td></tr>'; unset($content); } $navsoutput .= $text.'</table>'; } return $navsoutput; } function set_collapse($title,$text,$name){ global $collapsenum, $css, $head; if(!isset($collapsenum)){ $collapsenum = "1"; $head .= '<script language="javascript"> var ie4 = false; if(document.all){ ie4 = true; } function getObject(id){ if(ie4){ return document.all[id]; }else{ return document.getElementById(id); } } function toggle(link, divId, Name){ var lText = link.innerHTML; var d = getObject(divId); if(lText == \'+\'){ link.innerHTML = \'-\'; d.style.display = \'block\'; document.cookie = Name + "=shown"; }else{ link.innerHTML = \'+\'; d.style.display = \'none\'; document.cookie = Name + "=hidden"; } } </script>'; # it should be returning this outside of both the functions } return '<table cellspacing=0 width="50%" class=collapse> <tr class=collapsetitle> <td class=navtitle>[<a title="Show/Hide" class=toggle href="javascript: void(0);" onclick="toggle(this,\''.$key.'\',\''.$name.'\');">'.$h.'</a>]'.$title.'</td> </tr> <tr id="'.$key.'" class="'.$hidden.'"> <td>'.$text.'</td> </tr> </table>'; } $allnavs[test]=test.php $body = shownavs(); echo $head; echo $body; ?> ------------------------------------------------------------------------ [2006-11-16 16:24:54] [EMAIL PROTECTED] Please provide SHORT but COMPLETE reproduce code. Some comments in the code with expected and actual results are appreciated. ------------------------------------------------------------------------ [2006-11-16 16:14:54] mark at divinedesigns dot ca my source code is shown on these two webpages http://taith.divinedesigns.ca/bug.php http://taith.divinedesigns.ca/bug2.php ------------------------------------------------------------------------ [2006-11-16 16:10:49] [EMAIL PROTECTED] Thank you for this bug report. To properly diagnose the problem, we need a short but complete example script to be able to reproduce this bug ourselves. A proper reproducing script starts with <?php and ends with ?>, is max. 10-20 lines long and does not require any external resources such as databases, etc. If the script requires a database to demonstrate the issue, please make sure it creates all necessary tables, stored procedures etc. Please avoid embedding huge scripts into the report. ------------------------------------------------------------------------ The remainder of the comments for this report are too long. To view the rest of the comments, please view the bug report online at http://bugs.php.net/39535 -- Edit this bug report at http://bugs.php.net/?id=39535&edit=1