At 14.04.2002 14:55, you wrote: >Thank's Oliver, >now i have come up to this: <? >print ("<a href=german$PHP_SELF>link german</a>"); >?>
echo '<a href="german/'.$PHP_SELF.'/link german</a>"); It should like this, but I don´t know your encironment, so I put some "/" in hope you get it fixed or if you want to cat these vars to a new word $link = "german".$PHP_SELF."link german"; echo '<a href="'.$link.'">FOO</a>"); >and this seems to work as long as i add these php tags inside html, but how >do i insert this inside my array which is in the .js format (javascript) ? >any ideas that could help me? or would you need to look at the array? Maybe you´re mixin´up two things, where php is enough. But as I cannot know whats in your JavaScript, I can give you only a hint. Your JavaScript should be echoed also, To avoid conficts with java´s "'" you should escape them and/or the " . so it would look like echo " some javacode \' (foo)\' "; And as another hint "JavaScript" is client-side while PHP is serverside. You´re just delivering a page to the clients browser. HTH Oliver >Btw. excuse the question but what means HTH in the end of our reply? Hope this helps ><[EMAIL PROTECTED]> wrote in message >[EMAIL PROTECTED]">news:[EMAIL PROTECTED]... >At 13.04.2002 12:04, you wrote: > >hi folks, > >i am somewhat like a new newbie, just read my first php tutorial, installed > >an apache server on my windows and php on top for testing , first question > >is : is this the right place for me here to ask questions or is this > >newsgroup rather for advanced users? > >You´re welcome here, if your questions related to php. If there are specific >php-windows questions, you should ask them on the windowsPHP list. > > > >second question is my task i want to complete in PHP : > > > >i have an array for a dhtml navigation menu for my site. all the links are > >"hard coded" inside the array and are , of course , the same for the whole > >site EXCEPT for the language selection. > > > >now, for example, i am on a page called about.php, i am clicking on the >link > >for the german version and a page called german/about.php should be > >retrieved. same for spanish. > > > >now, what do i do? > >i have found a php snippet that reads the current url <?php > > > >$filelocation=$HTTP_HOST.$PHP_SELF; > >echo($filelocation);?> > > > >but can i use this somehow and how do i do that? > >You can shorten this : >echo "<a href="'$HTTP_HOST."/german/".$PHP_self.'">German</a>'; >echo "<a href="'$HTTP_HOST."/spanish/".$PHP_self.'">Espanol</a>'; >but it should be enough if you use >echo "<a href="'german/".$PHP_self.'">German</a>'; >assuming that this dir/page is locatet in the root of your vserver. >HTH Oliver -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php