[PHP-users 15355]Re: [PHP-users15354]ループ中の連想配列の値の変更

Seto seto @ cii.gr.jp
2003年 5月 19日 (月) 05:54:22 JST


おはようございます、Setoです。

>    foreach($result_p as $key => $value)
>    {
>      $result[] = $result_p[$key];

普通だと foreach の中では
$result[] = $value; でいいですよね。


どのように思うような結果が出ないのでしょうか
左辺が $result[$key]['date']じゃないからとか。

>// $result_p[$key][date] = date("m/d/Y", $result_p[$key][date]);

#配列の添え字は '' or "" で括ったほうがいいと思います。

******************************
 Junya Seto
******************************



PHP-users メーリングリストの案内