Link to home
Start Free TrialLog in
Avatar of rivkamak
rivkamakFlag for United States of America

asked on

forcing to lowercase

How can i force this output on my array into all lowercase?
	<b><?php echo CHtml::encode($data->getAttributeLabel('url')); ?>:</b>
	<?php echo CHtml::encode($data->url); ?>

Open in new window

ASKER CERTIFIED SOLUTION
Avatar of Marco Gasi
Marco Gasi
Flag of Spain image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
If you're new to PHP this article will help you get a foundation.
https://www.experts-exchange.com/Web_Development/Web_Languages-Standards/PHP/A_11769-And-by-the-way-I-am-new-to-PHP.html

Please see: http://www.laprbass.com/RAY_temp_rivkamak.php

<?php // RAY_temp_rivkamak.php
ini_set('display_errors', TRUE);
error_reporting(E_ALL);
echo '<pre>';

// TEST DATA
$str = "This CapiTalization DoESN't MAKE ANY seNSe.";
echo PHP_EOL . $str;

// SHOW A COUPLE OF TRANSFORMATIONS
$new = strtolower($str);
echo PHP_EOL . $new;

$new = ucfirst($new);
$new = str_replace("doesn't make any", "makes good", $new);
echo PHP_EOL . $new;

Open in new window

WHAT???????????   I gave him the function name that he needed, and a link to the documentation on how to use it!!!!!!!!!

It was NOT a blind link, it was a link to the php manual for that function.

He accepted MY answer, and I am the one who offered to share the points.
I totally agree with yodercm. I think the new policy of EE to censor comments which are unoffensive and politically correct is wrong in general. Censoring links to external sites, even if Q&A sites, makes EE to become a closed world and this goes against any acceptable concept of knowledge, especially scientific knowledge. It's a mystical perspective wich makes EE more similar to a beliefs than to a scientific community.

In this case, I think it has been applied erronoeusly: so, IMHO, a double error.
The really sad part of this is that I DID show it.  I gave exactly what the asker needed, and he accepted my post over that of marquisG's posted first, clearly proving that mine was more useful.

I also gave a link to the documentation that was self-explanatory.  Would it have made a difference if I had posted

"You need to use the strtolower() function, and the documentation is here:  ... yadayada link"

Does a concise answer rate lower than a wordy one, when the same information is totally obvious?   The asker accepted the concise answer.
@Netminder: following your link I get

503 Service Unavailable
No server is available to handle this request.

?
Thanks, you're really kind.
:-) ... but I know people who are kind never with nobody...
Cheers