06-25-2009, 12:31 PM
|
#1 (permalink)
|
|
The Wanderer
Join Date: Jun 2009
Posts: 20
Thanks: 2
|
PHP Parse error: parse error,syntex error unexpected ',' expectingT_STRING in my code
dear friend...
I have written one function in php first time and i got one error called parse error in line number 7.here i m trying to remove one value from an array.but m am not able to solve it.please solve this error..below is the code.
thanks...
function extract($this)
{
if($this->parent)
{
try
{
array_splice($parent->content->,$this);//here i can be remove from parent contents array.
}
catch(){}
}
$lastChild=$this->lastRecursiveChild();
$nextElement =$lastChild->next;
if($this->previous)
{
$this->previous->next=$nextElement;
}
if($nextElement)
{
$nextElement->previous=$this->previous;
}
$this->previous=null;
$lastChild->next = Null;
$this->parent = Null;
if ($this->previousSibling)
{
$this->previousSibling->nextSibling = $this->nextSibling;
}
if ($this->nextSibling)
{
$this->nextSibling->previousSibling = $this->previousSibling;
}
$this->previousSibling = $this->nextSibling = Null;
return $this;
}
|
|
|
|