<?php
$array1 = array(
1 => "Lorem ipsum w1 lorem ipsum",
2 => "Lorem ipsum w1 lorem ipsum",
3 => "Lorem ipsum w1 lorem w1 ipsum",
4 => "Lorem ipsum w1 lorem ipsum",
5 => "Lorem ipsum w1 lorem ipsum",
);
?>
「w1」という単語を別の単語「w2」に置き換えて、次のような新しい配列を生成するにはどうすればよいですか
<?php
$array1 = array(
1 => "Lorem ipsum w2 lorem ipsum",
2 => "Lorem ipsum w2 lorem ipsum",
3 => "Lorem ipsum w2 lorem w2 ipsum",
4 => "Lorem ipsum w2 lorem ipsum",
5 => "Lorem ipsum w2 lorem ipsum",
);
?>