Using var_export
BE AWARE This method is included because this is the answer to the question as asked; however, either of the other two methods is what you are actually looking for!
Let's assume you have an array...
$array = [
  'obj1' => 1000000000,
  'obj2' => 0,
  'obj3' => 100,
  'obj4' => 9032,
  'obj4' => 0,
];
You can turn it into a string like so (presumably this is what you do)...
$arrayString = var_export($array, true);
var_dump($arrayString);
/* Output:
string(80) "array (
  'obj1' => 1000000000,
  'obj2' => 0,
  'obj3' => 100,
  'obj4' => 0,
)"
*/
As you can see the $arrayString contains a string and not an array. You need to eval the string to return it to a usable array...
eval('$returnedArray = ' . $arrayString . ';');
var_dump($returnedArray);
/* Output:
array(4) {
  ["obj1"]=>
  int(1000000000)
  ["obj2"]=>
  int(0)
  ["obj3"]=>
  int(100)
  ["obj4"]=>
  int(0)
}
*/
echo $returnedArray["obj2"];
// Output: 0
Using json_*
Of course there are many potential pitfalls using eval in your code (especially if you don't have full control/supervision over the strings that will be passed to it!
So a better option may be to encode the data in a JSON string. PHP has built in functions to do just this: json_encode and json_decode
Convert array to JSON string:
$jsonString = json_encode($array);
var_dump($jsonString);
/* Output:
    
    string(48) "{"obj1":1000000000,"obj2":0,"obj3":100,"obj4":0}"
*/
Convert back to array:
$returnedArray = json_decode($jsonString, true); // The second parameter forces return of an array over an object
var_dump($returnedArray);
/* Output:
array(4) {
  ["obj1"]=>
  int(1000000000)
  ["obj2"]=>
  int(0)
  ["obj3"]=>
  int(100)
  ["obj4"]=>
  int(0)
}
*/
Using serialize
Naturally it doesn't stop there. PHP has specific functions to serialize data so that it can be stored in a textual format and returned to PHP usable data as well...
Serialize the string:
$serialString = serialize($array);
var_dump($serialString);
/* Output:
string(77) "a:4:{s:4:"obj1";i:1000000000;s:4:"obj2";i:0;s:4:"obj3";i:100;s:4:"obj4";i:0;}"
*/
Return the serialized string to a variable:
$returnedArray = unserialize($serialString);
var_dump($returnedArray);
/* Output:
array(4) {
  ["obj1"]=>
  int(1000000000)
  ["obj2"]=>
  int(0)
  ["obj3"]=>
  int(100)
  ["obj4"]=>
  int(0)
}
*/
     
    
array(...)as an array...execto run the code created byvar_export. I recommend against this method, I'm sure there's a better way (perhaps store the array as json instead)var_exportcreates a php-parsable string, but its not intended to use for serialization/deserialization. Useserialize/unserializeorjson_encode/json_decodeinstead.