I need to find a way to transfer all the values of an array inside a
function out of the fuction into another array. IE
function splice($filenam e){
if(file_exists( $filename)){
$value=array("0 "); // clear the array.
$rows=file($fil ename); // break text file into a rows array
for($num=0;$num < count($rows); ++$num){
$column=split(" ;",$rows[$num]);
$value[$num]=$column;}}
return $value;
}
$array1 = splice(file.txt )
Example file data would be
data1;an1;bc1
data2;an2;bc2
data3;an3;bc3
How do I go about getting the function to pass all it's data to the variable
$array1?
Thanks in advance.
Comment