Wuu Posted July 26, 2009 Report 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
Val Posted July 26, 2009 Report Posted July 26, 2009 http://us2.php.net/manual/en/book.mbstring.php Quote
Aleksejs Posted July 26, 2009 Report Posted July 26, 2009 UTF8 ir multibyte kodējums, tādēļ substr vietā jāizmanto mb_substr Quote
Wuu Posted July 26, 2009 Author Report Posted July 26, 2009 Paldies! $title_c = mb_substr($r[1],0,1,utf8); $title = mb_substr($r[1],1,-1,utf8); Quote
Maris-S Posted July 27, 2009 Report 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
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.