![]() |
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? |
Here we go:
echo("chicken-cheese-waffles); |
I wasn't specific enough, or maybe you're just being a sarcastic booger.
This is a string. I want to modify the string. :) |
sounds like someone is doing homework
|
No Pete, I'm not.
|
Quote:
|
|
$string = 'Chicken Cheese Waffles'; // or whatever the hell its stored in
strtolower($string); // makes it lowercase $string = str_replace(" ", "-", $string); // replace spaces with -'s |
strtolower function??
|
Thanks dissipate that's exactly it. I appreciate it.
I knew it was easy. Sheeeeesh. :1orglaugh |
Quote:
echo("chicken-cheese-waffles"); you left out a parenthysis. |
Quote:
|
Quote:
|
Quote:
|
homework?
|
Quote:
|
| All times are GMT -7. The time now is 01:16 PM. |
Powered by vBulletin® Version 3.8.8
Copyright ©2000 - 2025, vBulletin Solutions, Inc.
©2000-, AI Media Network Inc123