raila Posted April 9, 2006 Share Posted April 9, 2006 I have a textfile that contains the following:< 0> Brann< 0> Fredrikstad<4> vikingi whant to separate the "< 0>" (everything between < & >) and the "Name" after the < & >When i have separated the string i whant to echo"Name" (i.e Brann or Fredrikstad or viking)whitout the < > and everything between them.Need all the help i kan get.thank Raila. Quote Link to comment Share on other sites More sharing options...
Barand Posted April 9, 2006 Share Posted April 9, 2006 try[code]$str = '< 0> Fredrikstad';list(,$number,$name) = split ('[<>]', $str);echo $number; // --> 0echo $name; // --> Fredrikstad[/code] Quote Link to comment Share on other sites More sharing options...
raila Posted April 12, 2006 Author Share Posted April 12, 2006 Thanks for te help :-) Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.