It appears you have not yet registered with DEVPPL. To register please click here... (it's fast, easy and free!)

News

Log In Sponsors
Partner Sites

poblem with my echo ""



I have this:
[code:1sq6or9x]
<?
function main_menu($array, $indent=0) {
$prefix = "";
for ($i=0; $i<$indent; $i++) {
$prefix .= " ";
}
while (list ($key, $value) = each($array)) {
if (is_array($value)) {
echo $prefix . $key . "<br>";
tree_menu($value, $indent + 1);
} else {
echo $prefix . "<div class='tableft'></div> <div class='tab'><a href='" . $value . "'><font color='#FFFFFF'>" . $key . "</font></a></div> <div class='tabright'></div>";
}
}
}
?>
[/code:1sq6or9x]

The problem is when it outputs the last echo. For each link in the list i should go:

tableft|tab|tabright

but instead it is echoing out as

tabright|tab|tableft

any ideas why this would print out backwards?

Edit: I just realized that is actually reversing the entire echo process here.
so instead of getting

{ 1 } { 2 } { 3 }
I'm getting

} 3 { } 2 { } 1 {

Click here to read the whole forum topic