raivis Posted November 23, 2004 Report Share Posted November 23, 2004 $foo = 'hello world!'; $foo = ucwords($foo); // Hello World! $bar = 'HELLO WORLD!'; $bar = ucwords($bar); // HELLO WORLD! $bar = ucwords(strtolower($bar)); // Hello World! Vēlos gara teksta pirmajam vārdam pirmajam burtam atšķirīgu stilu ~ <font style="font-weight: bolder">Vārda pirmais burts</font. ..kā to izdarīt? Link to comment Share on other sites More sharing options...
Venom Posted November 24, 2004 Report Share Posted November 24, 2004 CSS: .text:first-letter {font:bold xx-large Verdana} bet laikam ne visur labi gāja ja esi pārliecināts, ka tas ir angļu (ne-utf8) texts, $text='<font style="font-size:xx-large">'.$text[0].'</font>'.substr($text,1); Link to comment Share on other sites More sharing options...
Kaklz Posted November 24, 2004 Report Share Posted November 24, 2004 pie teksta mainīgā attiecīgā simbola labā stila gadījumā tiek klāt nevis ar [], bet ar {}: $string = 'abc'; echo $string{0}; Tiesa, problēma ar utf-8 no tā mazāka nekļūst .. Link to comment Share on other sites More sharing options...
raivis Posted November 25, 2004 Author Report Share Posted November 25, 2004 LIELS paldiesiņš! Link to comment Share on other sites More sharing options...
Recommended Posts