Writing Array to File in php And getting the data

后端 未结 4 983
忘了有多久
忘了有多久 2021-02-05 21:38

I have An array which looks like following after using print_r

Array ( [0] => Array ( [0] => piklu [name] => piklu ) [1] => Array ( [0]          


        
4条回答
  •  慢半拍i
    慢半拍i (楼主)
    2021-02-05 22:11

    i m not sure but maybe its something like this. You want to serialize() the array on writting. it will put your array into test.txt

    file_put_contents('test.txt', serialize($array));
    

提交回复
热议问题