Don't know why! same code runs a time and don't another time
Posted: Fri Jan 17, 2003 5:40 am
Hi all,
in the same script code sometimes run and sometimes not *grumble
Take a look at this:
$count = count($data);
//this way count is ok
//echo $count;
// this way I'm not able to replace it with $count
$out = ereg_replace('##ANZAHL##', $count, $parts[0]);
// template is ok this way the template runs and replaces with test
//$out = ereg_replace('##ANZAHL##', "test", $parts[0]);
echo $out;
// this time a few lines above it runs fine
$i = 0;
while(each($data)):
list($id,$zeit,$name,$mail,$web,$text,$comment) = $data[$i];
$out1 = ereg_replace('##NUMMER##', $id, $parts[1]);
$out1 = ereg_replace('##ZEIT##', $zeit, $out1);
$out1 = ereg_replace('##NAME##', $name, $out1);
to be continued......
can anybody tell me why?
I did everything, I also deleted file from server and wrote it again.
thx for help
schmid
in the same script code sometimes run and sometimes not *grumble
Take a look at this:
$count = count($data);
//this way count is ok
//echo $count;
// this way I'm not able to replace it with $count
$out = ereg_replace('##ANZAHL##', $count, $parts[0]);
// template is ok this way the template runs and replaces with test
//$out = ereg_replace('##ANZAHL##', "test", $parts[0]);
echo $out;
// this time a few lines above it runs fine
$i = 0;
while(each($data)):
list($id,$zeit,$name,$mail,$web,$text,$comment) = $data[$i];
$out1 = ereg_replace('##NUMMER##', $id, $parts[1]);
$out1 = ereg_replace('##ZEIT##', $zeit, $out1);
$out1 = ereg_replace('##NAME##', $name, $out1);
to be continued......
can anybody tell me why?
I did everything, I also deleted file from server and wrote it again.
thx for help
schmid