The 1st line inside the function below gives me
this error: "... Undefined variable: search_str ..."
Yet when I substitute the numeral 3 for expr2 - it works!
--------------------------------------------------
function find_more_hits(){
for ($i = 1 ; $i < strlen($search_str) ; $i++) {
echo $search_str;
}
}
$search_str = "abc";
-------------------------------
Even with everything inside the for loop commented out, I get the same error.
Can you please tell me why expression2 is not working.
Thanks - Mayer
this error: "... Undefined variable: search_str ..."
Yet when I substitute the numeral 3 for expr2 - it works!
--------------------------------------------------
function find_more_hits(){
for ($i = 1 ; $i < strlen($search_str) ; $i++) {
echo $search_str;
}
}
$search_str = "abc";
-------------------------------
Even with everything inside the for loop commented out, I get the same error.
Can you please tell me why expression2 is not working.
Thanks - Mayer