PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!
Set Search Time - A google chrome extension. When you search only results from the past year (or set time period) are displayed. Helps tremendously when using new technologies to avoid outdated results.
function lcwords($str)
{
$ret = array();
$str = explode(' ', $str);
foreach ($str AS $word)
{
$altered = '';
for ($i=0; $i<strlen($word); $i++)
{
if (!$i)
{
$altered = strtolower($word[$i]);
} else
{
$altered .= $word[$i];
}
}
$ret[] = $altered;
}
return implode(' ', $ret);
}
echo lcwords('I AM A TEST STRING');
Set Search Time - A google chrome extension. When you search only results from the past year (or set time period) are displayed. Helps tremendously when using new technologies to avoid outdated results.