while($row = mysql_fetch_array($result)) {
echo "<tr>";
echo '<td>' . $row['fname'] . '</td>';
echo '<td>' . $row['lname'] . '</td>';
echo '<td>' .(( $row['gender']=='m' )?'male':'female'). '</td>';
echo '<td>' . $row['dob'] . '</td>';
echo '<td>' . $row['mobnum'] . '</td>';
// echo '<td>' . $row['mobnum'] . '</td>';
echo '<td>' . (($row['selqual']=='s')?'school':'college'). '</td>';
echo '<td>' . $row['address'] . '</td>';
echo '<td>' . $row['email_id'] . '</td>';
//get course = calling function
echo '<td>' . getcourse($row['course_name']) . '</td>';
echo '<td>' . $row['date_time'] . '</td>';
// echo '<td>'. $course_name=(explode(',',$_row['course_name'])) . '</td>';
echo "</tr>";
}
echo "</table>";
}
Hi i am fresh to php. I am populating and displaying these results in while loop from various tables in a db. I want to export those data to csv format. is there any way i can store them in an array and use the array for exporting??. if yes please guide me.