KillerBean Posted December 4, 2006 Report Share Posted December 4, 2006 Probleema - nezinaashana! :( varbuut kaads var ieteikt peec kaadas funkcijas jaasearcho, ja grib textu sadaliit peec simbolu skaita, piem. "texts texts texts texts" tiek sadaliits pa 10 simboliem: $x[0] = "texts text"; $x[1] = "s texts te"; $x[2] = "xts"; Link to comment Share on other sites More sharing options...
bubu Posted December 4, 2006 Report Share Posted December 4, 2006 http://php.net/str_split Link to comment Share on other sites More sharing options...
Stopp Posted December 4, 2006 Report Share Posted December 4, 2006 (edited) Ķip ir tāda funkcija substr. http://lv2.php.net/substr Bet nezinu, vai tā tev ko palīdzēs. Uz ātru roku varu uzrakstīt ko šādu. <?php $text='sdjfgdfgkfdghfghfgh'; // nu ķip teksts $pa_cik=10; // pa cik simboliem dalīt for($i=0;$i<ceil(strlen($text)/$pa_cik);$i++) { for($j=$i*$pa_cik;$j<$i*$pa_cik+$pa_cik;$j++) echo $text[$j]; } Varbūt es tur kaut ko saputroju, zin kā, vēls ;) edit: ou, tādu str_split nezināju :p nu lab, tad šitais nav vajadzīgs :) Edited December 4, 2006 by Stopp Link to comment Share on other sites More sharing options...
KillerBean Posted December 4, 2006 Author Report Share Posted December 4, 2006 heh :D blondi.. searchoju peec splita pirms tam... a tam vajag noraadiit kaa daliit ;) oki... tnx Link to comment Share on other sites More sharing options...
Orion7 Posted December 5, 2006 Report Share Posted December 5, 2006 wordwrap Link to comment Share on other sites More sharing options...
bubu Posted December 5, 2006 Report Share Posted December 5, 2006 Orion7: vai tu kādreiz vispār izlasi topika saturu, pirms raksti savus tekstus? Jau kurais tavējais posts pēc kārtas šitāds... Link to comment Share on other sites More sharing options...
Recommended Posts