Blogtrottr
Yahoo!奇摩知識+ - 分類問答 - 電腦網路 - 投票中
Yahoo!奇摩知識+ - 分類問答 - 電腦網路 - 投票中
php字串置換的問題
May 23rd 2013, 03:12

我有一段程式碼

$test="123456A";

想要做到以下的輸出
A123456

我有上網找到取得最後一個字方方法
$test=mb_substr($test,-1,1);

但是後面就不會了....我接下來應該要怎麼做呢才達到A放在最前面但後面又不消失呢??我知道可以用mb_substr($test,1,6);但是這樣變成每次我改字串內容程式碼就要跟著變....有沒有甚麼方法可以辦到呢??

This entry passed through the Full-Text RSS service — if this is your content and you're reading it on someone else's site, please read the FAQ at fivefilters.org/content-only/faq.php#publishers. Five Filters recommends: 'You Say What You Like, Because They Like What You Say' - http://www.medialens.org/index.php/alerts/alert-archive/alerts-2013/731-you-say-what-you-like-because-they-like-what-you-say.html

You are receiving this email because you subscribed to this feed at blogtrottr.com.

If you no longer wish to receive these emails, you can unsubscribe from this feed, or manage all your subscriptions
arrow
arrow
    全站熱搜

    candycrushsaga4 發表在 痞客邦 留言(0) 人氣()