RaaapuLis Posted August 13, 2008 Report Share Posted August 13, 2008 kr4 man piem. ir gars komentārs, un kā lai es to komentāru samazinu nu teiksim līdz 30 pirmajiem simboliem un tad 3 daudz punktes Lai butu nevis asdskdhsajkdbagfasdl\msdkykvnhalmvdf Bet gan asdskdhsa... Link to comment Share on other sites More sharing options...
andrisp Posted August 13, 2008 Report Share Posted August 13, 2008 if (strlen(garais_teksts) > 30) { iisaaks_teksts = substr(garais_teksts, 0, 30).'...'; } Link to comment Share on other sites More sharing options...
werd Posted August 13, 2008 Report Share Posted August 13, 2008 (edited) $str = 'jwefwjefwjefbwjefbwjefbwjfbwjf'; $isais_text = substr($str,0,100);//0 - no kura simbola parādītt, 100 - cik simbolus parādīt Sīkāk http://lv2.php.net/substr P.S andrisp pasteidzās ātrāk Edited August 13, 2008 by phpjanis Link to comment Share on other sites More sharing options...
RaaapuLis Posted August 13, 2008 Author Report Share Posted August 13, 2008 liels paldies viss stradaa ;) Link to comment Share on other sites More sharing options...
Kristabs Posted August 13, 2008 Report Share Posted August 13, 2008 mb_ priekš multibaitu tekstiem, ofc. Link to comment Share on other sites More sharing options...
Recommended Posts