Please find the logic:
$file_handle = fopen("file.txt", "rb");
while (!feof($file_handle) ) {
$line_of_text = fgets($file_handle);
$parts = explode(' ', $line_of_text);
foreach ($parts as $keys){
if($keys != ''){
$query_data[] =$keys;
}else{
$query_data[] ="NULL";
}
}
echo $str = implode(',', $query_data);
?>
Thursday, February 10, 2011
Subscribe to:
Post Comments (Atom)
thank You sir
ReplyDelete