Do you know how to access a variable in one class from another class? An array is just another type of variable.
There are several ways:
use a loop to copy element by element
use the clone()...
Type: Posts; User: Norm
Do you know how to access a variable in one class from another class? An array is just another type of variable.
There are several ways:
use a loop to copy element by element
use the clone()...
Yes. What you need to consider is if you want a copy of the contents of the array or if you just need a reference to the one array to be able to access that array from another class.