|
Posted by Ivαn Sαnchez Ortega on 10/22/05 13:49
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
NurAzije wrote:
> $lines = file_get_contents($url);
> $done=explode("@",$lines);
I think here lies your problem. explode() expects its second parameter to be
an string, but you are feeding it an array (file() always returns an
array). As a result of the automatic type casting, $done may be empty
everytime yourun the script.
You can either:
- - Use array_map to apply the explode() function to every element from
$lines, and then array_merge the results,
- - or use file_get_contents() instead of file(), that returns a string.
As usual, more information in php.net/manual ...
- --
- ----------------------------------
IvΓ‘n SΓ‘nchez Ortega -i-punto-sanchez--arroba-mirame-punto-net
http://acm.asoc.fi.upm.es/~mr/
Proudly running Debian Linux with 2.6.12-1-686 kernel, KDE3.4.2, and PHP
5.0.5-3 generating this signature.
Uptime: 12:47:15 up 15:50, 2 users, load average: 0.38, 0.43, 0.35
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.2 (GNU/Linux)
iD8DBQFDWhlK3jcQ2mg3Pc8RAsboAJ9jjcxTe0DLSC4UGhctFISP3ItfBwCfVENu
c+TD9oiDNhjcYxAwYQoo5Qw=
=knA6
-----END PGP SIGNATURE-----
Navigation:
[Reply to this message]
|