Considering the time I've been using PHP I feel shame for asking this, but it seems I'm way too tired to solve it by myself at this moment.
I have a php variable function that gets an CSV file and stores the data into an array.
$csvdata = function(){
// Get CSV data to array
return $array;
}
This array is used by other functions in different situations.
The thing is that I though this functions will run just once, but I just noticed it runs every time I use the var $csvdata.
What I want is to create a self evoked function that runs only once and store the data into an array that I can use as many times as needed without PHP re-doing the process of getting the csv and storing the data every time I use $csvdata.
Its really weird because I feel like if my brain is playing a joke on me... (Brain: "It's obvious... I know the answer but I wont tell you")
Sorry pals