Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
array_unique
#6
It doesn't work because you're creating a new file db.htm make 1 & 2 every time an user visits your site.
You use file_put_contents wrong, try it this way.

PHP Code:
file_put_contents('Database.html'implode(''array_unique(array_merge($data1,$data2))), FILE_APPEND); 
http://www.php.net/manual/en/function.fi...ntents.php

edit: for a new line use \n inside of double qoutes.
Reply


Messages In This Thread
array_unique - by Scorpion - 12-12-2009, 01:54 PM
RE: array_unique - by Socrates - 12-12-2009, 01:56 PM
RE: array_unique - by Scorpion - 12-12-2009, 02:06 PM
RE: array_unique - by Gaijin - 12-12-2009, 02:14 PM
RE: array_unique - by Scorpion - 12-12-2009, 02:24 PM
RE: array_unique - by Gaijin - 12-12-2009, 02:33 PM
RE: array_unique - by Scorpion - 12-13-2009, 07:58 AM
RE: array_unique - by Gaijin - 12-13-2009, 08:13 AM
RE: array_unique - by Scorpion - 12-13-2009, 10:46 AM
RE: array_unique - by Gaijin - 12-13-2009, 11:11 AM

Forum Jump:


Users browsing this thread: 8 Guest(s)