Reply to Re: How to disable link to current page?

Your name:

Reply:


Posted by J.O. Aho on 04/07/07 23:27

H@C0 wrote:
> I tried menu.php but I get thefollowing warnings:
>
> Warning: Unexpected character in input: '\' (ASCII=92) state=1 in
> E:\AppServ\www\test\menu-org.php on line 4
>
> Parse error: parse error, unexpected '"', expecting '}' in
> E:\AppServ\www\test\menu-org.php on line 4

you have a line break where there should be none

>> --- menu.php ---
1:>> <?PHP
2:>> function typeLink($page,$img,$title="",$alt="link image") {
3:>> if(basename ($_SERVER['PHP_SELF']) == $page)
4:>> return "<div class=\"nolnk\"><img src=\"{$img}\" alt=\"{$alt\"
>> title=\"{$title}\"></div>";
5:>> return "<div class=\"lnk\"><a href=\"{$page}\"><img src=\"{$text}\"
>> alt=\"{$alt}\" title=\"{$title}\"></a>/div>";
6:>> }
7:>>
8:>> echo typeLink('page1.php','someimage1.png','Page 1');
9;>> echo typeLink('page2.php','someimage2.png','Page 2');
10:>> echo typeLink('page3.php','someimage3.png','Page 3');
11:>> ?>
>> --- eof ---

--

//Aho

[Back to original message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация