Jawelin
12-11-2001, 12:56 PM
Hi. I found probably a bug in the replacement variable feature of VB 2.2.1 (and below, I guess).
You can find more information here (https://vborg.vbsupport.ru/showthread.php?s=&threadid=33121) in vb.org ...
Well, with a little studying, I found out the actual replacement code is in functions.php, here:
while ($var=$DB_site->fetch_array($vars)) {
if ($var['findword']!="") {
$newtext=str_replace($var['findword'],$var['replaceword'],$newtext);
}
}
My question is: your own opinion, could I generate any side effect replaceing the above line with the following one ?
$newtext=str_replace(strtoupper($var['findword']),$var['replaceword'],strtoupper($newtext));
I.e., this way, the $newtext variable is assigned from the strtoupper($newtext) or - hopefully - all the findword occurrences are replaced into the original $newtext, which remains the same ?
:confused: :confused:
Thank you for any help.
Bye
You can find more information here (https://vborg.vbsupport.ru/showthread.php?s=&threadid=33121) in vb.org ...
Well, with a little studying, I found out the actual replacement code is in functions.php, here:
while ($var=$DB_site->fetch_array($vars)) {
if ($var['findword']!="") {
$newtext=str_replace($var['findword'],$var['replaceword'],$newtext);
}
}
My question is: your own opinion, could I generate any side effect replaceing the above line with the following one ?
$newtext=str_replace(strtoupper($var['findword']),$var['replaceword'],strtoupper($newtext));
I.e., this way, the $newtext variable is assigned from the strtoupper($newtext) or - hopefully - all the findword occurrences are replaced into the original $newtext, which remains the same ?
:confused: :confused:
Thank you for any help.
Bye