Milonic provide full featured pull down web menus for some of the worlds largest companies
click here to see what it can do for you

Download Milonic DHTML Menu
Buy Milonic DHTML Menu

Back To Start Of Archive
Taken From The Forum: Help & Support for DHTML Menu Version 5+
Forum Topic: Click to view post
Last Updated: Saturday July 14 2012 - 06:07:35

Menu from MySQL *SOLVED*


Poster: pfpro
Dated: Thursday May 10 2007 - 15:13:57 BST

I try to include the menu (from sql) into my template engine (tbs)

is there any way to store the menu in a string first and display "later", instead of direct echo

like this:
Code:
$mmenu = buildMySQLMenu(1);
echo $mmenu;


thx in advance
phil


Poster: Andy
Dated: Thursday May 10 2007 - 19:51:13 BST

If you want to display the menu later you could try moving the echo $mmenu; command down further in your code.

template engine - no echo


Poster: pfpro
Dated: Friday May 11 2007 - 9:06:52 BST

come on guys...
that wasn't the type of answer i expected
i'm using a template system...
and want to store the menu output in a string via php
to place this var in my template file

no echo at all
i hate echo!


Poster: Andy
Dated: Friday May 11 2007 - 9:46:44 BST

Then the answer is no.

What other way is there for getting output into the browser from PHP?

Re: template engine - no echo


Poster: John
Dated: Friday May 11 2007 - 15:42:54 BST

pfpro wrote:
come on guys...
that wasn't the type of answer i expected
i'm using a template system...
and want to store the menu output in a string via php
to place this var in my template file

no echo at all
i hate echo!

1. Then why did you put 'echo' in your example?

2. Suggestion - chill. Folks here are trying to help, and your snap-back answer, quite frankly, isn't appreciated.

chill, yeah ;)


Poster: pfpro
Dated: Monday May 14 2007 - 14:02:13 BST

like i mentioned my template engine echos my output for me

the solution i found is:

Code:
<?
ob_start();

buildMySQLMenu(1);
$mmenu = ob_get_contents();

ob_end_clean();
?>


on template side:

Code:
<div style="height:30">
[var.mmenu]
</div>


i thought the (still) wonderful milonic menu might offer a function for this issue

maybe i didn't describe exactly enough what i was really looking for
keep it poppin'

best regards
phil