Support » Plugins » Calling Array Data

  • Resolved depperson


    First of all, I know it can be done, but I have no idea how to do it.

    I have a mouseover javascript in my header template that allows the following nifty little display – see and mouseover one of the links available.

    Here’s what I need. I want to have the array separate and outside the header.php file, so I don’t have to search everywhere to update it. I also need to know how I call that array information from back within the header.php file.

    And if anyone knows how to autopopulate the html links that activate the script/array, that would be cool, too. But just the call function is all I need for now. I can hardcode the links.

    Thanks ppl!

Viewing 2 replies - 1 through 2 (of 2 total)
  • Moderator Samuel Wood (Otto)

    (@otto42) Admin

    Put the text of those links in some other file, call it jslinks.php, for example. Just the messages[x]=… stuff. Or, well, any piece of it you want, really, just move it to the other file.

    Then, in your header.php or wherever you want it to be, do this:
    <?php include("jslinks.php"); ?>

    This pulls in that file’s contents right into the place where you put the include. Pretty straightforward, really.

    thanks otto, i knew it had to be easy.
    I’ll close the thread if all works out.

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Calling Array Data’ is closed to new replies.