利用 str_replace(目標字元,置換字元,來源字串)
1 |
<span id="lnum1" style="color: #606060"> 1:</span> $myname = <span style="color: #006080">" Ja s o n "</span>; |
1 |
<span id="lnum2" style="color: #606060"> 2:</span> $myname = str_replace(<span style="color: #006080">" "</span>,<span style="color: #006080">""</span>,$myname); |
1 |
<span id="lnum3" style="color: #606060"> 3:</span> <span style="color: #0000ff">echo</span> $myname; |
(Visited 46 times, 1 visits today)