兩句程式碼弄清楚php expload 與impload的用法

pengfoo發表於2014-03-20
<?php
    $str = "Hello world. It's a beautiful day.";
    print_r (explode(" ",$str));
    echo "<br />";
    print_r(implode("*", explode(" ",$str)));
?>

輸出:

Array ( [0] => Hello [1] => world. [2] => It's [3] => a [4] => beautiful [5] => day. ) 
Hello*world.*It's*a*beautiful*day.

相關文章