Witaj Gościu! ( Zaloguj | Rejestruj )

Forum PHP.pl

> Długość znaków?
Mazur_pl
post
Post #1





Grupa: Zarejestrowani
Postów: 87
Pomógł: 0
Dołączył: 11.05.2007

Ostrzeżenie: (0%)
-----


Mam taki kod:
  1. <?php
  2.  
  3. $start = 0;
  4.  
  5. $text = $start . 'To jest jakiś extra tekst , bardzo długi i wyczerpujący (IMG:http://forum.php.pl/style_emoticons/default/biggrin.gif) :
  6.  Ddddskpzoifpdoisgosdkgpfgkgfbuiohfiuh' . $end . 'thnkhdrsuhiudhgudhfjn dfbsaiuhsgiuhfdonbbls udhgiu
  7.  dfhbiudfb.';
  8.  
  9. $str = $end;
  10.  
  11.  
  12. if(strlen($text)>$str) {
  13. $text = substr($text, 0, $str) . '.....';
  14. }
  15.  
  16. echo nl2br($text);
  17.  
  18.  
  19. ?>


Jak mogę sprawdzić ile jest znaków między $start , a $end ? ;-)
Go to the top of the page
+Quote Post

Posty w temacie


Reply to this topicStart new topic
2 Użytkowników czyta ten temat (2 Gości i 0 Anonimowych użytkowników)
0 Zarejestrowanych:

 



RSS Aktualny czas: 24.12.2025 - 10:31