Hi, I am trying to learn OO php, is there any thing in the following code, which is totaly wrong.
private function get_data($filename,$table_columns)
{
$return_array;
//$row = 1;
$handle = fopen(".$filename.", "r");
while (($data = fgetcsv($handle, 1000, ",")) !== FALSE) {
$num = count($data);
$num1 == count($table_columns);
if ($num == $num1){
$att=array();
for ($c=0; $c < $num; $c++) {
$att[$table-colums[$c]]-$data[$c];
}
}
else
{
throw new RssParserException("No of colums in the table do not match number of colums in the array");
}
}
fclose($handle);
$returnarray[]=$att;
}
private function get_data($filename,$table_columns)
{
$return_array;
//$row = 1;
$handle = fopen(".$filename.", "r");
while (($data = fgetcsv($handle, 1000, ",")) !== FALSE) {
$num = count($data);
$num1 == count($table_columns);
if ($num == $num1){
$att=array();
for ($c=0; $c < $num; $c++) {
$att[$table-colums[$c]]-$data[$c];
}
}
else
{
throw new RssParserException("No of colums in the table do not match number of colums in the array");
}
}
fclose($handle);
$returnarray[]=$att;
}