i set a variable while im in a function, but it does not keep its value
when returning to the place the function was called. is this something to
do with register_global s being off? is there anyway i can make the
variable keep its value when returning to the code where it branched from?
TIA (again)
function textsearch($the _items_descript ion){
$pos = strpos($the_ite ms_description, $search_for);
if ($the_items_des cription == "") {
$does_contain_t ext = true;
} else {
if ($pos === false) {
$does_contain_t ext = false;
} else {
$does_contain_t ext = true;
}
}
echo ("before leaving <BR>");
echo ("$does_contain _text");
echo ("<br>");
}
when returning to the place the function was called. is this something to
do with register_global s being off? is there anyway i can make the
variable keep its value when returning to the code where it branched from?
TIA (again)
function textsearch($the _items_descript ion){
$pos = strpos($the_ite ms_description, $search_for);
if ($the_items_des cription == "") {
$does_contain_t ext = true;
} else {
if ($pos === false) {
$does_contain_t ext = false;
} else {
$does_contain_t ext = true;
}
}
echo ("before leaving <BR>");
echo ("$does_contain _text");
echo ("<br>");
}
Comment