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.

Post New Thread Reply

Register GFY Rules Calendar Mark Forums Read
Go Back   GoFuckYourself.com - Adult Webmaster Forum > >
Discuss what's fucking going on, and which programs are best and worst. One-time "program" announcements from "established" webmasters are allowed.

 
Thread Tools
Old 10-11-2006, 11:29 AM   #1
BradM
Confirmed User
 
Join Date: Dec 2003
Location: 1123,6536,5231
Posts: 3,397
PHP guys - im having a brain fart

I need to rewrite a statement and for some reason I am making it too hard to grasp to myself

I have:
Chicken Cheese Waffles
I want to lower case the letters, remove spaces and replace with -

What's the easiest way to do this?
BradM is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 10-11-2006, 11:31 AM   #2
gooddomains
Too lazy to set a custom title
 
Join Date: Jul 2003
Location: Netherlands
Posts: 10,127
Here we go:
echo("chicken-cheese-waffles);
gooddomains is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 10-11-2006, 11:32 AM   #3
BradM
Confirmed User
 
Join Date: Dec 2003
Location: 1123,6536,5231
Posts: 3,397
I wasn't specific enough, or maybe you're just being a sarcastic booger.
This is a string. I want to modify the string.
BradM is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 10-11-2006, 11:33 AM   #4
Pete-KT
Workin With The Devil
 
Industry Role:
Join Date: Oct 2004
Location: West Bloomfield, MI
Posts: 51,532
sounds like someone is doing homework
Pete-KT is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 10-11-2006, 11:34 AM   #5
BradM
Confirmed User
 
Join Date: Dec 2003
Location: 1123,6536,5231
Posts: 3,397
No Pete, I'm not.
BradM is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 10-11-2006, 11:35 AM   #6
martinsc
Too lazy to set a custom title
 
Industry Role:
Join Date: Jun 2005
Location: 127.0.0.1
Posts: 27,047
Quote:
Originally Posted by gooddomains View Post
Here we go:
echo("chicken-cheese-waffles);
__________________
Make Money
martinsc is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 10-11-2006, 11:35 AM   #7
BigBen
Confirmed User
 
Join Date: Nov 2004
Location: scv
Posts: 2,299
http://php.net/strtolower
http://php.net/str_replace
BigBen is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 10-11-2006, 11:36 AM   #8
dissipate
The Dirty Frenchman
 
dissipate's Avatar
 
Industry Role:
Join Date: Nov 2005
Location: Lost Angeles
Posts: 8,904
$string = 'Chicken Cheese Waffles'; // or whatever the hell its stored in
strtolower($string); // makes it lowercase
$string = str_replace(" ", "-", $string); // replace spaces with -'s
dissipate is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 10-11-2006, 11:37 AM   #9
CaptainHowdy
Too lazy to set a custom title
 
CaptainHowdy's Avatar
 
Industry Role:
Join Date: Dec 2004
Location: Happy in the dark.
Posts: 93,416
strtolower function??
__________________
"Tjeezers.cam wishes you a nice day”
CaptainHowdy is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 10-11-2006, 11:39 AM   #10
BradM
Confirmed User
 
Join Date: Dec 2003
Location: 1123,6536,5231
Posts: 3,397
Thanks dissipate that's exactly it. I appreciate it.

I knew it was easy. Sheeeeesh.
BradM is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 10-11-2006, 11:39 AM   #11
Kapitan Ivanov II
Confirmed User
 
Join Date: Jan 2005
Posts: 763
Quote:
Originally Posted by gooddomains View Post
Here we go:
echo("chicken-cheese-waffles);
wrong. should be

echo("chicken-cheese-waffles");

you left out a parenthysis.
__________________
Ivanov - The Original Russian Board Guy
Kapitan Ivanov II is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 10-11-2006, 11:41 AM   #12
CaptainHowdy
Too lazy to set a custom title
 
CaptainHowdy's Avatar
 
Industry Role:
Join Date: Dec 2004
Location: Happy in the dark.
Posts: 93,416
Quote:
Originally Posted by Kapitan Ivanov II View Post
wrong. should be

echo("chicken-cheese-waffles");

you left out a parenthysis.
What if he likes the php error messages??
__________________
"Tjeezers.cam wishes you a nice day”
CaptainHowdy is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 10-11-2006, 11:42 AM   #13
gooddomains
Too lazy to set a custom title
 
Join Date: Jul 2003
Location: Netherlands
Posts: 10,127
Quote:
Originally Posted by dissipate View Post
$string = 'Chicken Cheese Waffles'; // or whatever the hell its stored in
strtolower($string); // makes it lowercase
$string = str_replace(" ", "-", $string); // replace spaces with -'s
correct answer
gooddomains is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 10-11-2006, 11:43 AM   #14
gooddomains
Too lazy to set a custom title
 
Join Date: Jul 2003
Location: Netherlands
Posts: 10,127
Quote:
Originally Posted by CaptainHowdy View Post
What if he likes the php error messages??
There must be at least some challenge
gooddomains is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 10-11-2006, 11:45 AM   #15
Pete-KT
Workin With The Devil
 
Industry Role:
Join Date: Oct 2004
Location: West Bloomfield, MI
Posts: 51,532
homework?
Pete-KT is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 10-11-2006, 12:02 PM   #16
woj
<&(©¿©)&>
 
woj's Avatar
 
Industry Role:
Join Date: Jul 2002
Location: Chicago
Posts: 47,882
Quote:
Originally Posted by gooddomains View Post
Here we go:
echo("chicken-cheese-waffles);
__________________
Custom Software Development, email: woj#at#wojfun#.#com to discuss details or skype: wojl2000 or gchat: wojfun or telegram: wojl2000
Affiliate program tools: Hosted Galleries Manager Banner Manager Video Manager
Wordpress Affiliate Plugin Pic/Movie of the Day Fansign Generator Zip Manager
woj is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Post New Thread Reply
Go Back   GoFuckYourself.com - Adult Webmaster Forum > >

Bookmarks
Thread Tools



Advertising inquiries - marketing at gfy dot com

Contact Admin - Advertise - GFY Rules - Top

©2000-, AI Media Network Inc



Powered by vBulletin
Copyright © 2000- Jelsoft Enterprises Limited.