Re: AddRowAssocArray()
From: Rahul Anand (rahulanand_bis_at_rediffmail.com)
Date: 01/13/04
- Next message: David Ehmer: "Re: Unsupported operand type"
- Previous message: Dmitry Ruban: "Re: Game site script"
- In reply to: moosus: "AddRowAssocArray()"
- Next in thread: moosus: "Re: AddRowAssocArray()"
- Reply: moosus: "Re: AddRowAssocArray()"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: 13 Jan 2004 01:16:45 -0800
function addRowAssocArray ($row_assoc) {
$row = array();
foreach ($this->headers as $header) {
///////// This is the culprit code /////////////////////
if (! isset( $row_assoc[$header]))
$row[] = $row_assoc[$header];
///////////////////////////////////////////////////////
}
array_push($this->table_array, $row);
return true;
}
It should be:
if ( isset( $row_assoc[$header]))
$row[] = $row_assoc[$header];
-- Cheers, Rahul
- Next message: David Ehmer: "Re: Unsupported operand type"
- Previous message: Dmitry Ruban: "Re: Game site script"
- In reply to: moosus: "AddRowAssocArray()"
- Next in thread: moosus: "Re: AddRowAssocArray()"
- Reply: moosus: "Re: AddRowAssocArray()"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]