Ron.Herhuth,Helloļ¼
You have made a mistake.look at the declaration of substr function:
string substr(string string, int start, int [length]);
The third parameter means sub-string's length,not the position.Hence,you
should do like this:
";
for($i=0;$
e
the space from the $searchWord variable.
Derrick Hermanson
Programmer/Analyst I
[EMAIL PROTECTED]
-Original Message-
From: Gerardo Rojas [mailto:[EMAIL PROTECTED]
Sent: Friday, February 27, 2004 1:35 PM
To: [EMAIL PROTECTED]; [EMAIL PROTECTED]
Subject: RE: [PHP-WIN] Strange Substr Behav
EMAIL PROTECTED]
-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED]
Sent: Friday, February 27, 2004 1:15 PM
To: [EMAIL PROTECTED]
Subject: [PHP-WIN] Strange Substr Behavior
I'm trying to cycle through a keyword printing out three character
groupings starting from each letter i
I'm trying to cycle through a keyword printing out three character
groupings starting from each letter in the keyword. Here is the script I
am using:
$searchWord = "acme corporation"
$chars = strlen($searchWord);
echo "$searchWord";
for($i=0;$i<=$chars;$i++)
{
$j = $i + 3;
echo $i . ":" . $j