Parse error: parse error in /home/wizard/public_html/newstyle/Untitled-6.php on line 4
This is my first function.. Its for creating a tabbed menu.
The menu has selected, and not selected tabs. The selecteds are stated as class="navMenu2", and not selected menus are class="navMenu".
PHP Code:
function CreateFunction($text) {
$i = 1
// Sets up the menu order
$names = array(1 => Home,2 => Forum, 3 => Games, 4 => Gallery, 5 => Links, 6 => About);
// Sets up the menu link based on the text.
$links = array(Home => ../home.php, Forum => ../forum/, Games => ../games.php, Gallery => ../gallery.php, Links => ../links.php, About => ../about.php);
// Starting while loop for array $name[]
while ($names[$i]) {
// Confirmation
if ($names[$i] == $text) {
$menu .= <a href=$links[$text] class=
avMenu2>$text</a>;
} else {
$menu .= <a href=$links[$names[1]] class=
avMenu>$name[$i]</a>;
}
$i++
}
print $menu ;
}
And the way I use my function:
PHP Code:
<?php CreateFunction(Home); ?>
Parse error: parse error in /home/wizard/public_html/newstyle/Untitled-6.php on line 4
This is my first function.. Its for creating a tabbed menu.
The menu has selected, and not selected tabs. The selecteds are stated as class="navMenu2", and not selected menus are class="navMenu".
PHP Code:
function CreateFunction($text) {
$i = 1
// Sets up the menu order
$names = array(1 => Home,2 => Forum, 3 => Games, 4 => Gallery, 5 => Links, 6 => About);
// Sets up the menu link based on the text.
$links = array(Home => ../home.php, Forum => ../forum/, Games => ../games.php, Gallery => ../gallery.php, Links => ../links.php, About => ../about.php);
// Starting while loop for array $name[]
while ($names[$i]) {
// Confirmation
if ($names[$i] == $text) {
$menu .= <a href=$links[$text] class=
avMenu2>$text</a>;
} else {
$menu .= <a href=$links[$names[1]] class=
avMenu>$name[$i]</a>;
}
$i++
}
print $menu ;
}
And the way I use my function:
PHP Code:
<?php CreateFunction(Home); ?>
|
|
Search Webmaster Help and Solution
function has error on arrayRelated ItemsQuery failed: connection to localhost:3354 failed (errno=111, msg=Connection refused). |
