}
}
}
- else {
+ elseif (is_object($data)) {
if ($meth==NULL) {
while (ereg($expr,$format[$i],$ch)) {
+ $value = $data -> $ch[1];
+ if (is_array($value)) {
+ $value = $value[0];
+ }
if($ch[3]) {
if ($ch[5]) {
$s=$ch[3];
$s=0;
$l=$ch[3];
}
- $val=substr((string)$data,$s,$l);
- }
- else {
- $val=$data;
+ $value=substr((string)$value,$s,$l);
}
- $format[$i]=ereg_replace($ch[0],$val,$format[$i]);
+ $format[$i]=ereg_replace($ch[0],$value,$format[$i]);
}
}
else {
}
}
}
+ else {
+ while (ereg($expr,$format[$i],$ch)) {
+ if($ch[3]) {
+ if ($ch[5]) {
+ $s=$ch[3];
+ $l=$ch[5];
+ }
+ else {
+ $s=0;
+ $l=$ch[3];
+ }
+ $val=substr((string)$data,$s,$l);
+ }
+ else {
+ $val=$data;
+ }
+ $format[$i]=ereg_replace($ch[0],$val,$format[$i]);
+ }
+ }
}
if($unique) {
return $format[0];
$txt.='<li><pre>'.print_r($debug,true).'</pre></li>';
}
else {
- $txt.='<li>'.$debug.'</li>';
+ $txt.='<li><pre>'.$debug.'</pre></li>';
}
}
$txt.='</ul>';