-1
私は、データベースから値を持つ:配列値の印刷方法は?
:$rows = array();
foreach($results as $result)
{
$rows[] = array(
$result->fe_id,
$result->empcode,
$result->empname,
$result->empphoto,
);
}
とほかの機能の
function theme_form_example_function($variables)
{
$output ="<h2><pre>".print_r($variables)."</pre></h2>";
return $output;
}
ITSはと私が出力を印刷したい
Array (
[rows] =>
Array (
[0] =>
Array (
[0] => 1
[1] => 12
[2] => sim
[3] => dawn-landscape-mountains-nature-large.jpg
)
[1] =>
Array (
[0] => 2
[1] => EMP13
[2] => simnav
[3] => download-nature-wallpaper-23.jpg
)
)
[theme_hook_original] => form_example_function
)
のような出力が得られ
Empcode: 12 EmpName: Sim Emphot: dawn-landscape-mountains-nature-large.jpg
と2行目:
Empcode: EMP13 EmpName: Simnav Emphot: download-nature-wallpaper-23.jpg
がどのように私はこの出力を達成するために、上記の配列を使用することができますか?
注意:初期化されていない文字列のオフセット:theme_form_example_function中1() –
が –
おかげでバディ:) –