一.不管什么程序,function name(){}, for(){}, ….这太多了,不说也知道什么用了. 二.$str{4}在字符串的变量的后面跟上{}大括号和中括号[]一样都是把某个字符串变量当成数组处理. 三.{$val}这种情况就是我遇到的问题,这时候大括号起的作用就是,告诉PHP,括起来的要当成变量处理. 如下例子: //The following is okay as it's inside a string. Constants are not //looked for with
Java字符串中需要对一些字符进行替换,用到最多的是replace和replaceAll两个方法.这两个方法在使用的时候需要注意: replace: public String replace (CharSequence target, CharSequence replacement) Added in API level 1 Returns a copy of this string after replacing occurrences of target replaced with re