![]() |
![]() |
![]() |
||||
Welcome to the GoFuckYourself.com - Adult Webmaster Forum forums. You are currently viewing our boards as a guest which gives you limited access to view most discussions and access our other features. By joining our free community you will have access to post topics, communicate privately with other members (PM), respond to polls, upload content and access many other special features. Registration is fast, simple and absolutely free so please, join our community today! If you have any problems with the registration process or your account login, please contact us. |
![]() ![]() |
|
Discuss what's fucking going on, and which programs are best and worst. One-time "program" announcements from "established" webmasters are allowed. |
|
Thread Tools |
![]() |
#1 |
Too lazy to set a custom title
Join Date: Oct 2001
Location: Spartaaaaaaaaa
Posts: 14,136
|
How can I capitalize only the first letter in a sentence?
I have some text that goes like this:
whatever goes here whatever goes here too etc and I want to make it look like this: Whatever goes here Whatever goes here too Any ideas? |
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#2 |
Confirmed User
Join Date: Jul 2004
Location: Denmark ICQ: 7880009
Posts: 2,203
|
php
put the text in a .txt file with one sentence on each line <?php $data = file("filename.txt"); for($i=0;$i<count($data);$i++) { echo UCFirst($data[$i])."<br>\n"; } ?> |
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#3 |
MOBILE PORN: IMOBILEPORN
Join Date: Jan 2004
Location: Tinseltown NL
Posts: 16,502
|
edit:
or how explained above ;) |
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#4 |
Confirmed User
Join Date: Jul 2001
Location: The Netherlands
Posts: 197
|
<?php
$paragraphs = explode("\n", $text); $new_paragraphs = array(); foreach ($paragraphs as $paragraph => $text) { $ln=0; while ($text{$ln} || $text{$ln}hahahaha' ' || $text{$ln}hahahaha0) { if ($lnhahahaha0) {$new_paragraphs[$paragraph]=strtoupper($text{$ln});} else {$new_paragraphs[$paragraph].=$text{$ln};} } $text=''; foreach ($new_paragraphs as $paragraph => $text) { $text.=$text."\n"; } ?>
__________________
Message me for more info: ICQ 8322641 (@gmail.com). |
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#5 |
Too lazy to set a custom title
Join Date: Oct 2001
Location: Spartaaaaaaaaa
Posts: 14,136
|
thanks, I'll give a try in a sec
|
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#6 |
Confirmed User
Join Date: Jul 2001
Location: The Netherlands
Posts: 197
|
hahahaha is 2x =
__________________
Message me for more info: ICQ 8322641 (@gmail.com). |
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#7 |
Too lazy to set a custom title
Join Date: Oct 2001
Location: Spartaaaaaaaaa
Posts: 14,136
|
hmmmm
what is the 'hahahaha' ? |
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#8 |
Too lazy to set a custom title
Join Date: Oct 2001
Location: Spartaaaaaaaaa
Posts: 14,136
|
lo you beat me to it
thanks ;) |
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#9 | |
Too lazy to set a custom title
Join Date: Oct 2001
Location: Spartaaaaaaaaa
Posts: 14,136
|
Quote:
Thanks again |
|
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#10 |
Confirmed User
Join Date: Jul 2004
Location: Denmark ICQ: 7880009
Posts: 2,203
|
no problem
![]() |
![]() |
![]() ![]() ![]() ![]() ![]() |