Jump to content
php.lv forumi

Neskaidriba ar file rindu vardu nolasishanu!


lizard

Recommended Posts

Kr4 rekur ira rinda nokuras janolasa ir pirmais vards

aambo	2005-10-20 15:27:24	2006-11-25 21:14:37

bet izmantojot sho kodu es panaku ka man izvada

aambo	2005-10-20

KAda veida atkratities no ta pielikuma un dabut roka tikai pirmo vardu kas irrindinja?

 

<?
$data = file("file.txt");
$xxx = $data[0];
$str = explode(" ", $xxx);
Print("$str[0]");


?>

Link to comment
Share on other sites

Nav tur `space`

aambo 2005-10-20 15:27:24 2006-11-25 21:14:37

 

Loģiski, ka skripts izvada to $str[0] tā

 

aambo 2005-10-20<---cut left --$str[0] -->15:27:24 2006-11-25 21:14:37

 

Pamēģini

$str = explode("\t", $xxx);

Edited by blackhalt
Link to comment
Share on other sites

×
×
  • Create New...