Title: Need help to define a variable
Last modified: August 19, 2016

---

# Need help to define a variable

 *  [imjscn](https://wordpress.org/support/users/imjscn/)
 * (@imjscn)
 * [15 years, 1 month ago](https://wordpress.org/support/topic/need-help-to-define-a-variable/)
 * I have an Array in one file:
 *     ```
       function myArray{
        global $the_array;
        $the_array =Array (......);
       }
       ```
   
 * now, in another file, I want to use this array,
    should I say: `$var = $the_array;`
   or, should I say: `$var = array($the_array)`
 * Thanks for helping!

The topic ‘Need help to define a variable’ is closed to new replies.

## Tags

 * [variable](https://wordpress.org/support/topic-tag/variable/)

 * In: [Everything else WordPress](https://wordpress.org/support/forum/miscellaneous/)
 * 0 replies
 * 1 participant
 * Last reply from: [imjscn](https://wordpress.org/support/users/imjscn/)
 * Last activity: [15 years, 1 month ago](https://wordpress.org/support/topic/need-help-to-define-a-variable/)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
