hy,
im working with a big file, with about 40000 arrays, and for example, i have a lot off blank arrays with nothing...
so i have use array_unique(); to erase arrays with double values in this case all blank arrays are gone... but now my problem is that im afraid that i could lost some information in other arrays by having the same first names ou surnames and lost that arrays...
what for me the best solution for this, and the best way to work with a big file and manipulate with arrays ??
thanks in advance
working with big file array_unique() question ??
Moderator: General Moderators
no...
becouse its like this...
array[0] => name, surname phone somedate
array[1] =>
array[3] => date: x/x/x sex:
array[4] => payed by:
array[5] =>
array[6] => more stuff here
then jumps more 12 blank arrays and goo for the next person... until reach the array[53245]...
i want to sort everything, like
array[1] => Name
array[2] => Surname
array[3] => phone
array[4] => x/x/x
array[5] => stuff1
array[6] => stuff2
blank blank blank and more sorting
and what i understand from you is store array[1] => name, surname phone somedata into DB and then get it with other script to explode it... and put again in DB ?
becouse its like this...
array[0] => name, surname phone somedate
array[1] =>
array[3] => date: x/x/x sex:
array[4] => payed by:
array[5] =>
array[6] => more stuff here
then jumps more 12 blank arrays and goo for the next person... until reach the array[53245]...
i want to sort everything, like
array[1] => Name
array[2] => Surname
array[3] => phone
array[4] => x/x/x
array[5] => stuff1
array[6] => stuff2
blank blank blank and more sorting
and what i understand from you is store array[1] => name, surname phone somedata into DB and then get it with other script to explode it... and put again in DB ?
something like this:
jhas, sdsdsd number Current
address, jkhjsdhjsh, dkjd
Added 20/12/2005 by X Changed / / by
18/12/2005
phone
phone
Date of Birth: 31/10/1980 Age: 25 Sex: Female Marital Status:
jhas, sdsdsd number Current
address, jkhjsdhjsh, dkjd
Added 20/12/2005 by X Changed / / by
18/12/2005
phone
phone
Date of Birth: 31/10/1980 Age: 25 Sex: Female Marital Status:
jhas, sdsdsd number Current
address, jkhjsdhjsh, dkjd
Added 20/12/2005 by X Changed / / by
18/12/2005
phone
phone
Date of Birth: 31/10/1980 Age: 25 Sex: Female Marital Status:
1
2
and then will be more 3 people
just to say that i found a easy solution for my blank arrays...
now i just need to explode line after line... 
Code: Select all
for ($i = 2 ; $i <= $total; $i++) {
$var = $array[$i];
$var = trim($var);
if (!empty($var)) {
echo $i ."-".$array[$i] ."<br>";
}
}