hallo.
ich habe eine textdatei wie:
Code:
Hallo, das hier ist ein lustiger Text blablabl ablab lab labla Hallo, das hier ist ein lustiger Text blablabl ablab lab labla
-------------------------
Und hier kommt noch mal ein lustiger Text Und hier kommt noch mal ein lustiger Text Und hier kommt noch mal ein lustiger Text Und hier kommt noch mal ein lustiger Text
-------------------------
Noch mehr text Noch mehr text Noch mehr text Noch mehr text Noch mehr text Noch mehr text Noch mehr text Noch mehr text
-------------------------
Nun würde ich gerne die einzelnen Textabschnitte in einem array haben.
mache ich so:
PHP-Code:
<?php
$singles = split('-------------------------', $commentfile);
?>
hatte ich in perl genauso, hat top funktioniert.
nun sollte doch der erste textabschnitt in $singles[0] liegen, oder? tat es zumindest in perl.
$singles[0] gibt jedoch nur den text "Array" aus.
was soll ich tun?