u explian me how to do it...and i hve tht of this also...i wll use a count variable while reading and use name [count]=$str[0] and value[count] =$str[1] insie the while loop and as soon as we enter keep incrimenting count..
so tht its jst matter of for loop and implode in write function...
The $_POST[] is really an associative array so yo ucan simply loop through it and for any thing where the key() is either name or location you can write an appropriate line to te text file.
Try something like:
[php]
foreach($_POST as $lcItem)
{
if (key() == 'name')
{
// write a line to the file using file functions
}
if (key() == 'location'
{
// write a line to the file using file functions
}
}
[/php]
I have not tried this, I am typing this whilst I play with my 9month old daughter - so that's me done for the weekend, I'll check back on monday.
Cheers
nathj