Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
複数の画像を配列に保存したいのですが、画像は配列であるため、私のアプローチはうまくいきませんでした。
これが私のアプローチでした:
for($i=2;$i<=$image_row;$i++){ $image = 'image'.$i; $allImages[] = array( 'image' => $mysqli->real_escape_string($_SESSION[$image])); }
では、なぜ画像を配列で定義するのでしょうか?
なぜ単純ではないのですか:
for($i=2;$i<=$image_row;$i++){ $image = 'image'.$i; $allImages[] = $mysqli->real_escape_string($_SESSION[$image]); }