plastiC Posted January 15, 2004 Report Share Posted January 15, 2004 esmu pa shito lasiijis, bet aizmirsu kur, cereeju varbuut te kaads man varees pateikt, kaa tas iisti daraams.. lieta taada.. man ir gbooks un gribu nofixeet 1 vaarda garumu, lai nefloodotu utt. piem. 1 vaarda maximaalais simbolu skaits 30, kaa to var panaakt? Link to comment Share on other sites More sharing options...
hu_ha Posted January 15, 2004 Report Share Posted January 15, 2004 kaut vai ar - if (strlen($teksts)>30) {saki ka ir slikti} else {labi} var arii ar ereg() (skatiities php manuaalii) Link to comment Share on other sites More sharing options...
Venom Posted January 15, 2004 Report Share Posted January 15, 2004 /([^[:space:]]){30}/ Link to comment Share on other sites More sharing options...
blackhalt Posted January 15, 2004 Report Share Posted January 15, 2004 shite ar pienjemsim ka ir 3: <?php $vards='1234'; function jebkas(){ echo 'te var buut viskas arii die:<br />'; die('mirstu'); } if (strlen($vards) > 3){ $vards = substr($vards,0,3); // vai jebkas(); echo $vards; } ?> Link to comment Share on other sites More sharing options...
plastiC Posted January 15, 2004 Author Report Share Posted January 15, 2004 thanx, par paliidziibu... ;) Link to comment Share on other sites More sharing options...
Recommended Posts