PHP Script Trouble

kbjradmin

New Member
Messages
512
Reaction score
2
Points
0
i have a php script designed to build the code for an HTML format résumé. however, every time i run this script, the $resumeCode variable (where i'm storing the HTML) turns up empty. i tried dumping the value of the variable and it returned NULL. here is the script:

PHP:
<?php



// sets category code block for resume
function resumeCategory($title){
	$code = '<div class="category"><h1>'.$title.'</h1><hr /></div>';
	return $code;
}



// sets education code block for resume
function resumeEdu($school,$loc,$degree,$date){
	$code = '<div class="eduBlock"><p>'.$school.' '.$loc.'<br />'.$degree.'<br />'.$date.'</p></div>';
	return $code;
}



// sets two column list for resume
function resumeList($items){
	$minItems = 4;			# any list containing this many or less items will be one column
	if ( count($items) <= $minItems ){
		$code = '<div class="itemlist">';
		for ($i = 0; $i <= count($items); $i++){
			$code = $code.'<p>'.$items[$i].'</p>'."\n";
		}
		$code = $code.'</div>';
	}
	else{
		$numItemsHalf = count($items) / 2;
		$code1 = '<div class="itemlist1">';
		for ($i = 0; $i <= $numItemsHalf-1; $i++){
			$code1 = $code1.'<p>'.$items[$i].'</p>'."\n";
			$code1 = $code1.'</div>';
		}
		$code2 = '<div class="itemlist2">';
		for ($i = $numItemsHalf; $i <= count($items); $i++){
			$code2 = $code2.'<p>'.$items[$i].'</p>'."\n";
			$code2 = $code2.'</div>';
		}
		$code = '<div class="compoundList">'.$code1."\n".$code2.'</div>';
	}
	return $code;
}



// sets experience block for resume
function resumeExp($title,$compName,$date,$desc){
	$code = '<div class="exp"><h1>'.$title.'</h1><h2>'.$compName.'</h2><h3>'.$date.'</h3><p>'.$desc.'</p></div>';
	return $code;
}



// sets reference block for resume
function resumeRef($name,$relation,$phone,$email){
	$code = '<div class="ref"><h1>'.$name.'</h1><h2>'.$relation.'</h2><h3>'.$phone.'</h3><h4>'.$email.'</h4></div>';
	return $code;
}




// sets resume code
$resumeCode = '<div id="resume">'.

//*
resumeCategory(
	'Education'
	).//*/

//*
resumeEdu(
	'Clark College',
	'Vancouver, Wa',
	'Associates in Applied Technology',
	'To Be Completed: June 2009'
	).//*/

//*
resumeCategory(
	'Major College Courses'
	).//*/

//*
resumeList(
	array(
		'Intro To Programming',
		'Intro To Unix',
		'Calculus I'
		)
	).//*/

//*
resumeCategory(
	'Skills'
	).//*/

//*
resumeList(
	array(
		'Microsoft Office 2003/2007',
		'XHTML 1.0, CSS',
		'PHP',
		'Python',
		'Logical Problem Solving',
		'Windows XP / Vista / DOS (also 95 and 98)',
		'Debian Linux (can use VI)',
		'Unix Shell Scripting',
		'Higher Level Mathematics',
		'Website Administration',
		'Currently Studying Perl'
		)
	).//*/

//*
resumeCategory(
	'Experience'
	).//*/

//*
resumeExp(
	'Webmaster',
	'',
	'',
	'Designed and coded personal portfolio site using XHTML, CSS, and PHP. Site validated for XHTML Transitional 1.0 and CSS Level 2.1. I am also currently in the process of building a template selling site and a form/mailing script generating site. All sites are available through my main portal at http://kbjr.x10hosting.com.'
	).//*/
	
//*
resumeExp(
	'Shell Programmer',
	'',
	'',
	'Wrote multiple useful Linux shell scripts. Scripts were written under Debian Linux using VI and written for use in the bash shell. Scripts written include a script for echoing text in color and locking the Linux terminal.'
	).//*/
	
//*
resumeExp(
	'Python Programmer',
	'',
	'',
	'Wrote multiple simple scripts including an extension to the built-in math library, a statistics library, a basic module for converting between strings and lists, a card deck handling system, and a text-interface poker game.'
	).//*/

//*
resumeCategory(
	'References'
	).//*/

//*
resumeRef(
	'Gail Thurber',
	'Web Design Instructor',
	'(360) 604 - 6227',
	''
	).//*/

'</div>';
//*/



?>

please help
 
Last edited:

leafypiggy

Manager of Pens and Office Supplies
Staff member
Messages
3,819
Reaction score
163
Points
63
Why would you write such a complicated script when you could just do it with plain HTML?
 

kbjradmin

New Member
Messages
512
Reaction score
2
Points
0
Why would you write such a complicated script when you could just do it with plain HTML?

two reasons; one, so it will be easier to change in the future, and two, because i want to get better at my PHP.
 

Livewire

Abuse Compliance Officer
Staff member
Messages
18,169
Reaction score
216
Points
63
It's gunna be extra work, but for the sake of argument, echo the result of each function on a separate line in html - my guess is one of them is going to return a blank(null) line, and that may very well be messing up the entire $resumeCode line.


Course that also brings up another question - why not just echo the result of each function back to HTML, instead of putting it in $resumeCode? If you're only gunna need it all once, you might as well just dump it straight to user instead of storing it in a variable first.
 

kbjradmin

New Member
Messages
512
Reaction score
2
Points
0
ok, so i tried putting this in the actual page:
PHP:
<?php echo resumeCategory("test"); ?>

but it still won't show up, and on top of that, everything below that point in the source code doesn't show up either.

i know this isn't just the resumeCategory() function because i tried the resumeEdu() function as well, and it did the same thing.
 

leafypiggy

Manager of Pens and Office Supplies
Staff member
Messages
3,819
Reaction score
163
Points
63
if you echo the string in the function

its just

PHP:
theFunction();
 

kbjradmin

New Member
Messages
512
Reaction score
2
Points
0
i didn't echo the results, i used return; but i will try it with echo in the function.

edit:
nope, didn't work.
 
Last edited:

leafypiggy

Manager of Pens and Office Supplies
Staff member
Messages
3,819
Reaction score
163
Points
63
Then nothing is being passed to the script
 

kbjradmin

New Member
Messages
512
Reaction score
2
Points
0
what do you mean?

in case it helps, here are the files i used.

resume.php (the actual page):
PHP:
<?php
$id = 2;        # unique page id number
include('resumeconfig.php;');
include('config.php');
?>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">

<head>

<!--Data Tags-->
<title><?php echo $pageTitle[0].$pageTitle[$id]; ?></title>
<meta http-equiv="Content-Type" content="text/html;charset=utf-8" />
<meta name="Author" content="James Brumond" />

<!--Includes-->
<link rel="shortcut icon" href="media/favicon.ico" />
<link rel="stylesheet" href="style.css" />
<!--[if IE]><link rel="stylesheet" href="ie.css" /><![endif]-->

</head>

<body>

<script language="javascript" type="text/javascript" src="maindiv.js"></script><!--Open Centered DIV Tag-->

<?php
echo $headCode;
echo $menuCode;
?>

<div id="frame">

<div id="content">
<div id="resumelinks">
<label>View in Microsoft Word (.doc) format - <a href="<?php echo $menuUrls[0].'resume.doc'; ?>">Click Here</a></label><br />
<label>View in Portable Document Format (.pdf) - <a href="<?php echo $menuUrls[0].'resume.pdf'; ?>">Click Here</a></label>
</div>

<p class="para">The HTML Version of This Page is Currently Down For Rebuilding.</p>

<?php
echo $resumeCode;
?>

</div>

</div>

<?php echo $footCode; ?>

<script language="javascript" type="text/javascript" src="close.js"></script><!--Close Centered DIV Tag-->

</body>

</html>

resumeconfig.php:
PHP:
<?php



// sets category code block for resume
function resumeCategory($title){
    $code = '<div class="category"><h1>'.$title.'</h1><hr /></div>';
    return $code;
}



// sets education code block for resume
function resumeEdu($school,$loc,$degree,$date){
    $code = '<div class="eduBlock"><p>'.$school.' '.$loc.'<br />'.$degree.'<br />'.$date.'</p></div>';
    return $code;
}



// sets two column list for resume
function resumeList($items){
    $minItems = 4;            # any list containing this many or less items will be one column
    if ( count($items) <= $minItems ){
        $code = '<div class="itemlist">';
        for ($i = 0; $i <= count($items); $i++){
            $code = $code.'<p>'.$items[$i].'</p>'."\n";
        }
        $code = $code.'</div>';
    }
    else{
        $numItemsHalf = count($items) / 2;
        $code1 = '<div class="itemlist1">';
        for ($i = 0; $i <= $numItemsHalf-1; $i++){
            $code1 = $code1.'<p>'.$items[$i].'</p>'."\n";
            $code1 = $code1.'</div>';
        }
        $code2 = '<div class="itemlist2">';
        for ($i = $numItemsHalf; $i <= count($items); $i++){
            $code2 = $code2.'<p>'.$items[$i].'</p>'."\n";
            $code2 = $code2.'</div>';
        }
        $code = '<div class="compoundList">'.$code1."\n".$code2.'</div>';
    }
    return $code;
}



// sets experience block for resume
function resumeExp($title,$compName,$date,$desc){
    $code = '<div class="exp"><h1>'.$title.'</h1><h2>'.$compName.'</h2><h3>'.$date.'</h3><p>'.$desc.'</p></div>';
    return $code;
}



// sets reference block for resume
function resumeRef($name,$relation,$phone,$email){
    $code = '<div class="ref"><h1>'.$name.'</h1><h2>'.$relation.'</h2><h3>'.$phone.'</h3><h4>'.$email.'</h4></div>';
    return $code;
}




// sets resume code
$resumeCode = '<div id="resume">'.

//*
resumeCategory(
    'Education'
    ).//*/

//*
resumeEdu(
    'Clark College',
    'Vancouver, Wa',
    'Associates in Applied Technology',
    'To Be Completed: June 2009'
    ).//*/

//*
resumeCategory(
    'Major College Courses'
    ).//*/

//*
resumeList(
    array(
        'Intro To Programming',
        'Intro To Unix',
        'Calculus I'
        )
    ).//*/

//*
resumeCategory(
    'Skills'
    ).//*/

//*
resumeList(
    array(
        'Microsoft Office 2003/2007',
        'XHTML 1.0, CSS',
        'PHP',
        'Python',
        'Logical Problem Solving',
        'Windows XP / Vista / DOS (also 95 and 98)',
        'Debian Linux (can use VI)',
        'Unix Shell Scripting',
        'Higher Level Mathematics',
        'Website Administration',
        'Currently Studying Perl'
        )
    ).//*/

//*
resumeCategory(
    'Experience'
    ).//*/

//*
resumeExp(
    'Webmaster',
    '',
    '',
    'Designed and coded personal portfolio site using XHTML, CSS, and PHP. Site validated for XHTML Transitional 1.0 and CSS Level 2.1. I am also currently in the process of building a template selling site and a form/mailing script generating site. All sites are available through my main portal at http://kbjr.x10hosting.com.'
    ).//*/
    
//*
resumeExp(
    'Shell Programmer',
    '',
    '',
    'Wrote multiple useful Linux shell scripts. Scripts were written under Debian Linux using VI and written for use in the bash shell. Scripts written include a script for echoing text in color and locking the Linux terminal.'
    ).//*/
    
//*
resumeExp(
    'Python Programmer',
    '',
    '',
    'Wrote multiple simple scripts including an extension to the built-in math library, a statistics library, a basic module for converting between strings and lists, a card deck handling system, and a text-interface poker game.'
    ).//*/

//*
resumeCategory(
    'References'
    ).//*/

//*
resumeRef(
    'Gail Thurber',
    'Web Design Instructor',
    '(360) 604 - 6227',
    ''
    ).//*/

'</div>';
//*/



?>

config.php:
PHP:
<?php

#
# config.php
# By: James Brumond
# Created: 27 January, 2009
#

// declare arrays for use
$pageTitle = array();           # page titles
$menuUrls = array();            # urls used in menuGen() function
$menuText = array();            # text used in menuGen() function

// flags
$flags[0] = 1;          # display copyright?
$flags[1] = 1;          # display center index?
$flags[2] = 1;          # display valid XHTML/CSS?

// define page titles
$pageTitle[0] = 'James Brumond - Professional Portfolio';       # base prepended to all titles
$pageTitle[1] = ' - Home';                                      # ~/www/index.php
$pageTitle[2] = ' - R&eacute;sum&eacute;';                      # ~/www/resume.php
$pageTitle[3] = ' - Portfolio';                                 # ~/www/portfolio/*.php
$pageTitle[4] = ' - Contact Me';                                # ~/www/contact/index.php
$pageTitle[5] = ' - Site Map';                                  # ~/www/sitemap.php
$pageTitle[6] = ' - Contact Me';                                # ~/www/contact/process.php
$pageTitle[10] = ' - Error: '.$eCode.$eName;                    # ~/www/error.php

// define menu urls
$menuUrls[0] = 'http://portfolio.kbjr.x10hosting.com/'; # base url
$menuUrls[1] = $menuUrls[0].'index.php';                # home page
$menuUrls[2] = $menuUrls[0].'resume.php';               # resume page
$menuUrls[3] = $menuUrls[0].'portfolio/';               # porfolio page
$menuUrls[4] = $menuUrls[0].'contact/';                 # contact page
$menuUrls[5] = $menuUrls[0].'sitemap.php';              # sitemap page

// define menu text
$menuText[1] = 'Home';                          # home page
$menuText[2] = 'R&eacute;sum&eacute;';          # resume page
$menuText[3] = 'Portfolio';                     # portfolio page
$menuText[4] = 'Contact Me';                    # contact page
$menuText[5] = 'Site Map';                      # sitemap page
$menuText[6] = 'Contact Me - '.$success;        # contact process page
$menuText[10] = 'Error: '.$eCode.' - '.$eName;  # error page

// define header data
$headData['img'] = $menuUrls[0].'media/header.png';
$headData['logo'] = $menuUrls[0].'media/logoSmall.png';
$headData['text'] = 'James Brumond - Profesional Portfolio';
$headData['sub'] = $menuText[$id];

function headGen($headData){
    $headCode = '<div id="head">
    <img src="'.$headData['logo'].'" class="logo" alt="" />
    <img src="'.$headData['img'].'" class="head" alt="" />
    <h1 class="head">'.$headData['text'].'</h1>
    <h2 class="head">'.$headData['sub'].'</h2>'./*
    <a href="javascript:hidden();" class="hidden"><img src="'.$menuUrls[0].'media/blank.gif" class="hidden" alt="" /></a>
    .*/'</div>';
    return $headCode;
}

function menuGen($menuUrls, $menuText){
    $menuCode = '<div id="menu"><p>'."\n";
    for ( $i = 1; $i <= count($menuUrls)-1; $i++ ){
        $menuCode = $menuCode.'<a href="'.$menuUrls[$i].'" class="menu">'.$menuText[$i].'</a>';
        $menuCode = $menuCode."\n";
    }
    $menuCode = $menuCode.'</p></div>';
    return $menuCode;
}

function footGen($flags, $menuUrls, $menuText){
    $footCode = '<div id="foot">
    <div id="left">';
    // first flag
    if ($flags[0]){ $footCode = $footCode.'<p>Copyright 2009.</p>'; }
    $footCode = $footCode.'</div>
    <div id="center">';
    // second flag
    if ($flags[1]){
        $menuIndex = '<p>'."\n";
        for ( $i = 1; $i <= (count($menuUrls)-1); $i++ ){
            $menuIndex = $menuIndex.'<a href="'.$menuUrls[$i].'" class="index">'.$menuText[$i].'</a>'."\n";
            if ( $i != 5 ){
                $menuIndex = $menuIndex.' | '."\n";
            }
            else{
                $menuIndex = $menuIndex."\n";
            }
        }
        $footCode = $footCode.$menuIndex.'</p>';
    }
    $footCode = $footCode.'</div>
    <div id="right">';
    // third flag
    if ($flags[2]){
        $footCode = $footCode.'<p>Valid <a href="http://validator.w3.org/check?uri=referer" class="valid">XHTML</a>
        and <a href="http://jigsaw.w3.org/css-validator/" class="valid">CSS</a>!</p>';
    }
    $footCode = $footCode.'</div>
    </div>';
    return $footCode;
}

function sitemapItem($num,$url,$title,$description){
    $code = '<div class="sitemap'.$num.'">
    <a href="'.$url.'">'.$title.'</a>
    <p>'.$description.'</p>
    </div>';
    return $code;
}

$headCode = headGen($headData);
$menuCode = menuGen($menuUrls, $menuText);
$footCode = footGen($flags, $menuUrls, $menuText);

?>
 

kbjradmin

New Member
Messages
512
Reaction score
2
Points
0
i'm also having trouble with a function that's supposed to generate the html for a navagation menu.

here is the php function
PHP:
function menuGen($menuUrls, $menuText){
    $menuCode = '<div id="smoothmenu1" class="ddsmoothmenu"><ul>';
    for ( $i = 1; $i <= count($menuUrls)-1; $i++ ){
    
        if ( is_array($menuUrls[$i]) ){
            $menuCode = $menuCode."\n".'<li><a href="'.$menuUrls[$i][0].'">'.$menuText[$i][0].'</a>'."\n".'<ul>';
            
            for ( $n = 1; $n <= count($menuUrls[$i])-1; $n++ ){
            
                if ( is_array($menuUrls[$i][$n]) ){
                    $menuCode = $menuCode."\n".'<li><a href="'.$menuUrls[$i][$n][0].'">'.$menuText[$i][$n][0].'</a>'."\n".'<ul>';
                    
                    for ( $m = 1; $m <= count($menuUrls[$i][$n])-1; $m++ ){
                        $menuCode = $menuCode."\n".'<li><a href="'.$menuUrls[$i][$n][$m].'">'.$menuText[$i][$n][$m].'</a></li>';
                    }
                    
                    $menuCode = $menuCode."\n".'</ul>';
                else{
                    $menuCode = $menuCode."\n".'<li><a href="'.$menuUrls[$i][$n].'">'.$menuText[$i][$n].'</a></li>';
                }
                
            }
            
            $menuCode = $menuCode."\n".'</ul>';
        }
        else{
            $menuCode = $menuCode."\n".'<li><a href="'.$menuUrls[$i].'">'.$menuText[$i].'</a></li>';
        }
        
            
    }
    $menuCode = $menuCode.'</ul></div>';
    return $menuCode;
}

and its supposed to generate this html output

HTML:
<div id="smoothmenu1" class="ddsmoothmenu">
<ul>
<li><a href="http://portfolio.kbjr.x10hosting.com">Home</a></li>
<li><a href="resume.php">Resume</a>
  <ul>
  <li><a href="resume.php">HTML Format</a></li>
  <li><a href="resume.pdf">PDF Format</a></li>
  <li><a href="resume.doc">MS Word Format (.doc)</a></li>
  </ul>
</li>
<li><a href="portfolio">Portfolio</a>
  <ul>
  <li><a href="portfolio/web">Web Development</a>
    <ul>
    <li><a href="portfolio/web/#">Item</a></li>
    <li><a href="portfolio/web/#">Item</a></li>
    <li><a href="portfolio/web/#">Item</a></li>
    </ul>
  </li>
  <li><a href="portfolio/python">Python Scripting</a>
    <ul>
    <li><a href="portfolio/python/#">Item</a></li>
    <li><a href="portfolio/python/#">Item</a></li>
    <li><a href="portfolio/python/#">Item</a></li>
    </ul>
  </li>
  
  <li><a href="portfolio/shell">Shell Programming</a>
    <ul>
    <li><a href="portfolio/shell/#">Item</a></li>
    <li><a href="portfolio/shell/#">Item</a></li>
    <li><a href="portfolio/shell/#">Item</a></li>
    </ul>
  </li>
  </ul>
</li>
<li><a href="contact.php">Contact Me</a></li>

<li><a href="sitemap.php">Site Map</a></li>
</ul>
</div>

but all i get is a blank page.
please help.
 

Spasm

New Member
Messages
10
Reaction score
0
Points
0
Try putting this at the top of whatever script is executed/included first:
Code:
error_reporting(E_ALL);
 

garrettroyce

Community Support
Community Support
Messages
5,609
Reaction score
250
Points
63
use $menucode .= instead of $menucode = $menucode . etc. this won't fix your problem, but it will clean up the code a bit :) In general, anytime you are trying to do something like x = x +1 or x = x - 1, there is an operator to do this, ie += and -=, respectively.

there are two problems here, I think
Code:
<?php
echo $headCode;
echo $menuCode;
?>

$menuCode is not defined. It is a function variable and is not valid anywhere outside of your function menuGen.

You have to call menuGen to get the code for your menu. So, what you can do is:
Code:
<?php
echo headerGen(.......);
echo menuGen(..........);
 

kbjradmin

New Member
Messages
512
Reaction score
2
Points
0
RESUME.PHP PROBLEM:

ok, to test that there was actually something in my $resumeCode variable, i used a var_dump() at the end of resumeconfig.php and when i go to resumeconfig.php in my browser, it works, all of my code shows up. but when i do a var_dump() in resume.php, it doesn't. so i have to assume that there is something wrong with my include(). but it all looks right. please help.



MENUCODE PROBLEM:

i tried using the error_reporting(E_ALL); and i still just got a blank page, no error messages.
 

kbjradmin

New Member
Messages
512
Reaction score
2
Points
0
require uses the same syntax as include, correct? because that just gave me a blank page.
 

garrettroyce

Community Support
Community Support
Messages
5,609
Reaction score
250
Points
63
:) ty

it's always the little things that get you in trouble :p
 

gomarc

Member
Messages
516
Reaction score
18
Points
18
About your navagation menu...

Data used:
Code:
$menuUrls[0][0][0] = "http://portfolio.kbjr.x10hosting.com";
$menuText[0][0][0] = "Home";

$menuUrls[1][0][0] = "resume.php";
$menuText[1][0][0] = "Resume";

$menuUrls[1][1][0] = "resume.php";
$menuText[1][1][0] = "HTML Format";

$menuUrls[1][2][0] = "resume.pdf";
$menuText[1][2][0] = "PDF Format";

$menuUrls[1][3][0] = "resume.doc";
$menuText[1][3][0] = "MS Word Format (.doc)";

$menuUrls[2][0][0] = "portfolio";
$menuText[2][0][0] = "Portfolio";

$menuUrls[2][1][0] = "portfolio/web";
$menuText[2][1][0] = "Web Development";

$menuUrls[2][1][1] = "portfolio/web/#";
$menuText[2][1][1] = "Web Item 1";

$menuUrls[2][1][2] = "portfolio/web/#";
$menuText[2][1][2] = "Web Item 2";

$menuUrls[2][2][0] = "portfolio/python";
$menuText[2][2][0] = "Python Scripting";

$menuUrls[2][2][1] = "portfolio/python/#";
$menuText[2][2][1] = "Python Item 1";

$menuUrls[3][0][0] = "contact.php";
$menuText[3][0][0] = "Contact Me";

$menuUrls[4][0][0] = "sitemap.php";
$menuText[4][0][0] = "Site Map";

And the php code is:
PHP:
<?php

echo menuGen($menuUrls, $menuText);


function menuGen($menuUrls, $menuText)
{

  $menuCode = '<div id="smoothmenu1" class="ddsmoothmenu">'."\n".'<ul>';
  for ( $i = 0; $i <= count($menuUrls)-1; $i++ )
  {
    $n = 0;
    $x = 0;
    $menuCode = $menuCode."\n".' <li><a href="'.$menuUrls[$i][$n][$x].'">'.$menuText[$i][$n][$x].'</a></li>';
    if ( count($menuUrls[$i]) > 1 )
    { 
        $menuCode = $menuCode."\n".'   <ul>';
        for ( $n = 1; $n <= count($menuUrls[$i])-1; $n++ )
        {
        $x = 0;
        $menuCode = $menuCode."\n".'   <li><a href="'.$menuUrls[$i][$n][$x].'">'.$menuText[$i][$n][$x].'</a></li>';
        
        if ( count($menuUrls[$i][$n]) > 1 )
          {
            $menuCode = $menuCode."\n".'     <ul>';
            for ( $x = 1; $x <= count($menuUrls[$i][$n])-1; $x++ )
            {
            $menuCode = $menuCode."\n".'     <li><a href="'.$menuUrls[$i][$n][$x].'">'.$menuText[$i][$n][$x].'</a></li>';
            }
            $menuCode = $menuCode."\n".'     </ul>'."\n";
          }    
        }
        $menuCode = $menuCode."\n".'   </ul>'."\n";
    }  
  }
  $menuCode = $menuCode."\n".'</ul>'."\n".'</div>';
return $menuCode;  
}

?>
 
Last edited:
Top