Wuu Posted July 26, 2009 Report Share Posted July 26, 2009 $title_c = substr($r[1],0,1); $title = substr($r[1],1); <b>'.$title_c.'</b>'.$title.' Es šādi atdalu pirmo burtu lai ieliktu viņu bold tāgā ,bet ir problēma ja pirmais burts ir ar garumzīmi ,burts tiek sabojāts. Kā lai izlabo? Quote Link to comment Share on other sites More sharing options...
Val Posted July 26, 2009 Report Share Posted July 26, 2009 http://us2.php.net/manual/en/book.mbstring.php Quote Link to comment Share on other sites More sharing options...
Aleksejs Posted July 26, 2009 Report Share Posted July 26, 2009 UTF8 ir multibyte kodējums, tādēļ substr vietā jāizmanto mb_substr Quote Link to comment Share on other sites More sharing options...
Wuu Posted July 26, 2009 Author Report Share Posted July 26, 2009 Paldies! $title_c = mb_substr($r[1],0,1,utf8); $title = mb_substr($r[1],1,-1,utf8); Quote Link to comment Share on other sites More sharing options...
Maris-S Posted July 27, 2009 Report Share Posted July 27, 2009 Varbūt ieinteresēs šis: http://www.w3schools.com/css/css_pseudo_elements.asp http://www.w3schools.com/css/pr_pseudo_first-letter.asp Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.