|
发表于 2008-7-10 05:18:28
|
显示全部楼层
|阅读模式
来自 中国–湖南–怀化–鹤城区
Fatal error: Only variables can be passed by reference in D:\web\stats\includes\class_table.php on line 212
以下是212的内容
[PHP] $c = array_pop(array_keys($cols, $key)); // which column index matches the $key [/PHP]
下面是大范围的
[PHP]// inserts a new column before or after the key specified
function insert_columns($col, $key = null, $after = false) {
if ($key !== null and array_key_exists($key, $this->columns)) {
$newcols = array();
$curcols = array_values($this->columns);
$cols = array_keys($this->columns);
$c = array_pop(array_keys($cols, $key)); // which column index matches the $key
if ($after) $c++;
for ($i=0; $i < $c; $i++) { // keep preceeding columns
$newcols[ $cols[$i] ] = $curcols[$i];
}
$newcols = array_merge($newcols, $col); // insert new columns
while ($i < count($curcols)) { // add remaining columns
$newcols[ $cols[$i] ] = $curcols[$i];
$i++;
}
$this->columns = $newcols;
# print_r($this->columns);
} else {
// add new columns to the end
$this->columns = array_merge($this->columns, $col);
}
}[/PHP]
那位高手帮帮忙啊 |
|