Title: Calling Array Data
Last modified: August 18, 2016

---

# Calling Array Data

 *  Resolved [depperson](https://wordpress.org/support/users/depperson/)
 * (@depperson)
 * [19 years, 11 months ago](https://wordpress.org/support/topic/calling-array-data/)
 * 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 [http://www.gpc-iphc.org/?page_id=4](http://www.gpc-iphc.org/?page_id=4)
   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)](https://wordpress.org/support/users/otto42/)
 * (@otto42)
 * WordPress.org Admin
 * [19 years, 11 months ago](https://wordpress.org/support/topic/calling-array-data/#post-393170)
 * 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.
 *  Thread Starter [depperson](https://wordpress.org/support/users/depperson/)
 * (@depperson)
 * [19 years, 11 months ago](https://wordpress.org/support/topic/calling-array-data/#post-393328)
 * 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.

## Tags

 * [array](https://wordpress.org/support/topic-tag/array/)
 * [call](https://wordpress.org/support/topic-tag/call/)
 * [function](https://wordpress.org/support/topic-tag/function/)
 * [java](https://wordpress.org/support/topic-tag/java/)
 * [php](https://wordpress.org/support/topic-tag/php/)
 * [script](https://wordpress.org/support/topic-tag/script/)

 * 2 replies
 * 2 participants
 * Last reply from: [depperson](https://wordpress.org/support/users/depperson/)
 * Last activity: [19 years, 11 months ago](https://wordpress.org/support/topic/calling-array-data/#post-393328)
 * Status: resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
