Ben bir dizi php bir dizi olmaz neden anlamaya çalışıyorum deli devam ettik.
Ben anlayamıyorum bir nedenle ben smarty sınıfta bir hata var. Kod şudur:
$compiled_tags = array();
for ($i = 0, $for_max = count($template_tags); $i < $for_max; $i++) {
$this->_current_line_no += substr_count($text_blocks[$i], "\n");
// I tried array push instead to see
// bug is here
array_push($compiled_tags,$this->_compile_tag($template_tags[$i]));
//$compiled_tags[] = $this->_compile_tag($template_tags[$i]);
$this->_current_line_no += substr_count($template_tags[$i], "\n");
}
hata mesajı
Warning: array_push() expects parameter 1 to be array, integer given in ....
OR önce []
Warning: Cannot use a scalar value as an array in ....
Ben $ compiled_tags bir var_debug çalışıyor ve en kısa sürede ben artık döngü için bir dizi değil girmek ama bir tamsayı. Ben değişken adlandırma çalıştı, ama aynı sorun.
Ben kaçırdım bu kadar basit bir şey olduğundan emin değilim ama ben onu anlamaya olamaz. Herhangi bir yardım (her zaman olduğu gibi) memnuniyetle olduğunu!