Jump to content

Can I set a var to #anchor value?


PhilipK

Recommended Posts

Is it possible to use #anchors to set a variable in PHP?

 

For instance if I the url was http://example.com/portfolio.php#flash

 

have $location = flash

 

???

 

Here is my code so far..

 

   <script type="text/javascript">

    Shadowbox.open({
        content:    '<div id="<?php echo "$location" ?>
">Welcome to my website!</div>',
        player:     "html",
        title:      "Welcome",
        height:     350,
        width:      350
    });

</script>

 

Thanks in advance

Link to comment
https://forums.phpfreaks.com/topic/228318-can-i-set-a-var-to-anchor-value/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.