1

2 つの配列があるとします。

$arr1=array("foo"=>"bar", 1=>"one", 2=>"two");
$arr2=array("h"=>"eich", 3=>"three", 4=>"four");

file_put_contents を使用することで、配列を次のような新しい php ファイルに出力できます。

<?php
$arr1 = Array
(
   "foo"=>"bar",
    1=>"one",
    2=>"two"
) //need a semicolon here 
$arr2 = Array
(
   "h"=>"eich",
    3=>"three",
    4=>"four"
)//need a semicolon here 

私の質問は、各配列の末尾の後にセミコロンを取得するにはどうすればよいですか?

4

1 に答える 1