07-13-2012, 11:43 AM
Hi,
Please help me fix that error:
Parse error: syntax error, unexpected T_IF, expecting T_WHILE in /home/gin/public_html/sks/classes/import_export.php on line 864
line 864: if ( ( $this->xml_tags[$i]['field'] == $this->curr_element || $this->xml_tags[$i]['alias'] == $this->curr_element ) && !isset( $this->row_array[$this->xml_tags[$i]['field']] ) )
Thanks for help!
Please help me fix that error:
Parse error: syntax error, unexpected T_IF, expecting T_WHILE in /home/gin/public_html/sks/classes/import_export.php on line 864
Code:
public function character_data( $parser, $data )
{
if ( !$this->curr_element )
{
return;
}
$this->whitespace_strip( $data );
$i = 0;
while ( $i < count( $this->xml_tags ) )
{
if ( $data != "" )
{
do
{
if ( !( $this->xml_tags[$i]['field'] == $this->curr_element || $this->xml_tags[$i]['alias'] == $this->curr_element ) )
{
break;
}
else
{
if ( isset( $this->row_array[$this->xml_tags[$i]['field']] ) )
{
$this->row_array[$this->xml_tags[$i]['field']] .= $data;
}
else
{
$this->row_array[$this->xml_tags[$i]['field']] = $data;
}
break;
}
}
if ( ( $this->xml_tags[$i]['field'] == $this->curr_element || $this->xml_tags[$i]['alias'] == $this->curr_element ) && !isset( $this->row_array[$this->xml_tags[$i]['field']] ) )
{
$this->row_array[$this->xml_tags[$i]['field']] = "";
}
break;
} while ( 0 );
++$i;
}
}
line 864: if ( ( $this->xml_tags[$i]['field'] == $this->curr_element || $this->xml_tags[$i]['alias'] == $this->curr_element ) && !isset( $this->row_array[$this->xml_tags[$i]['field']] ) )
Thanks for help!