Hi Sir ,
I have a problem , in my Function "$StrArray" should be a global array that fiil by call the function , and I should use it , but by following syntax I cant do this . please help me to use the correct syntax for this perpose .
Function GetWordOfRequestStr ($Str) {
global $WordCount,$StrArray; (this is may be wrong format to define a global function)
$TmpStr = '';
$Str=trim($Str);
print("<br>");
For ($i=0;$i<=strlen($Str);$i++){
print (IsSeperator(substr($Str,$i,1)));
If (IsSeperator(substr($Str,$i,1))==1) {
if ($TmpStr <> '') {
$WordCount=$WordCount+1;
$StrArry[$WordCount]=$TmpStr; (this is wrong way )
$TmpStr='';
}
}
else
$TmpStr=$TmpStr+substr($Str,$i,1);
}
if ($TmpStr <> '') {
$WordCount=$WordCount+1;
$StrArry[$WordCount]=$TmpStr;
}
}
thanks again , with the best wishes, Arman.
please send me by email , my email is :
arman1112002@yahoo.com