I have stored array in txt file using file_put_contents() in php, php array write successfullu in text file as same time how to read that text file into php?
<?php
$arr = array('name','rollno','address');
file_put_contents('array.txt', print_r($arr, true));
?>
The above php write text file in successfully. i want read that text file in php?
print_rusevar_exportinsteadvar_exportor just create a json file$strarray = file_get_contents('input_array_export.txt');and my input_array_export.txt containarray ( 'select' => array ( 189 => array ( 'vl' => array ( 0 => '2', 1 => '1', )and then i have tried toprint_r($strarray['select']);it has returnaselectindex from readed array