Sorry, just lost my C++ mind there for a minute. I guess strcpy() is just a matter of :
$string2 = $string1;
But what about all those other useful functions like Left(), Mid() and Right() ? What if I just want to copy the first 15 chars from a 20 char string into another string?
Getting strlen() doesn't do much good here, since there is no strcpy() that I can find in the library to set start and stop boundaries.
If there is, please let me know (I run PHP 4.0).
I certainly hope the solution is NOT something like :
for ($i = 0; $i < ( (strlen($string) - $YOUR_LIMIT)); $i++)
{
$sting2[$i] = $string1[$i];
}
Haven't we evolved beyond that ?