dAivEd Posted June 18, 2009 Report Share Posted June 18, 2009 Labdien! Man ir sekojosha problema: Ir teksts "PATIK SPELET" vajag atmest visu pirms atstarpes lai sanaktu "SPELET" Quote Link to comment Share on other sites More sharing options...
marcis Posted June 18, 2009 Report Share Posted June 18, 2009 strpos() + substr() Quote Link to comment Share on other sites More sharing options...
kechums Posted June 18, 2009 Report Share Posted June 18, 2009 Biju tieši šādu ierakstu veicis savā blogā: http://k4y.lv/raksts/?id=35 Quote Link to comment Share on other sites More sharing options...
J0ke Posted June 18, 2009 Report Share Posted June 18, 2009 (edited) list($pirms, $peec) = explode(' ','PATIK SPELET',2); echo $peec; ok biju jau piemirsis par trešo parametru :) kapēc ne explode? izskatās īsi un eleganti nekā čupa ar citām funkcijām... Edited June 18, 2009 by J0ke Quote Link to comment Share on other sites More sharing options...
marcis Posted June 18, 2009 Report Share Posted June 18, 2009 J0ke, tā var darīt arī tad, ja ir vairākas atstarpes. Apskaties explode() manuāli, ir iespējams norādīt arī 3. parametru - limitu. Taču nedomāju, ka šeit būtu vajadzīgs explode. 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.