Hi All,
I just want to know if thr is any function for the follwoing
$Name = dynamicdrive;
Now i want the 6th character alone should become capital. If it is possible help me out
Hi All,
I just want to know if thr is any function for the follwoing
$Name = dynamicdrive;
Now i want the 6th character alone should become capital. If it is possible help me out
No function that I know of but
should do it. I also don't understand the title of this, is there something to do with arrays?PHP Code:<?php
$Name = "dynamicdrive";
$become = substr($Name, 0, 4) . strtoupper(substr($Name, 5, 1)) . substr($Name, 6);
?>
Corrections to my coding/thoughts welcome.
you can access strings by character offset, but they're still strings, not arrays.
PHP Code:$str = 'dynamicdrive';
$str[0] = strtoupper($str[0]);
$str[7] = strtoupper($str[7]);
print $str; // prints "DynamicDrive"
Bookmarks