我已經聲明瞭一個函數來REVERS全句:如何聲明一個類的函數來扭轉信在一個句子的第一個字
<?php
class String {
private $error;
private $length;
private $string = "";
private $array = array();
private $index = 0;
private $indexOf = false;
private $word;
private $str;
public function __construct($string="") {
$this->string = $string;
}
public function revers_sentence() {
$this->string = strrev($this->string);
return $this;
}
...但如何聲明一個類功能翻領信在一個句子的第一個字裏?
public function revers_1_word() {
hmm ?
}
你問我們寫的代碼對你來說,還是? – 2010-12-22 19:02:15