Brom
Gummibärchen
- 13 Januar 2007
- 656
- 69
Hallo,
Ich hab ein Problem mit explode :
Code (test.php) :
Code (test.txt) :
so wenn ich jetzt die test.php aufrufe
bekomme ich :
ausgabe1|ausgabe2|ausgabe3
ich will aber nur :
ausgabe1ausgabe2
Liegt das jetzt an explode oder an readfile ? Was muss ich anstatt readfile nehmen ?
Mfg
powergrafik
Ich hab ein Problem mit explode :
Code (test.php) :
PHP:
<?php
$data = readfile ("test.txt");
list($test1, $test2, $test3) = explode("|", $data);
echo $test1;
echo $test2;
?>
Code (test.txt) :
Code:
ausgabe1|ausgabe2|ausgabe3
so wenn ich jetzt die test.php aufrufe
bekomme ich :
ausgabe1|ausgabe2|ausgabe3
ich will aber nur :
ausgabe1ausgabe2
Liegt das jetzt an explode oder an readfile ? Was muss ich anstatt readfile nehmen ?
Mfg
powergrafik