csv delimiter and data type

Questionscsv delimiter and data type
Vygandas asked 10 years ago

Hello,

What part of code and where I could change and have:
1. csv file delimiter ";"
2. Data type as Text
3. Remove header line in file

Thank You!

1 Answers
Abu Ghufran answered 10 years ago

Edit jqgrid_dist.php,

Find this code…

$fp = fopen('php://output', 'w');
foreach ($arr as $key => $value)
{
fputcsv($fp, $value);
}
die;

You can change it to …

$arr = array_shift($arr); // to remove header

$fp = fopen('php://output', 'w');
foreach ($arr as $key => $value)
{
fputcsv($fp, $value, ";"); // 3rd arg to ;
}
die;

Your Answer

8 + 5 =

Login with your Social Id:

OR, enter

Attach code here and paste link in question.
Attach screenshot here and paste link in question.



How useful was this discussion?

Click on a star to rate it!

Average rating 0 / 5. Vote count: 0

No votes so far! Be the first to rate it.

We are sorry that this post was not useful for you!

Let us improve this post!

Tell us how we can improve this post?