我剛問過一個question on SO,發現我可以利用++
來遞增字母。現在我已經試過這樣:增量字母:奇怪的問題
$last_id = get_last_id();
echo gettype($last_id); //string
echo 'L_ID ->'.$last_id.'<br />'; //AAF
$next_id = $last_id++;
echo 'N_ID ->'.$next_id.'<br />';//AAF
下面的例子,我被賦予正常工作:
$x = 'AAZ';
$x++;
echo $x;//ABA
這是怎麼回事?必須在一天的工作結束...
感謝所有的幫助
或者他可以把它分成兩個語句:'$ last_id ++; $ next_id = $ last_id;' – FrustratedWithFormsDesigner 2010-08-25 15:52:10
啊,我不知道,那。每次我就這個問題提出問題時,都會強調我對PHP的瞭解!謝謝保羅。 – Abs 2010-08-25 15:52:18
@Abs:另外,這些操作符存在於許多其他語言中,它們的行爲也是類似的。 – FrustratedWithFormsDesigner 2010-08-25 15:53:22