Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.

Kemito's avatar

@Ci As @SachinAgarwal showed the code. Think a bit of this. You go into the loop , you take your record, update its value, then next caption comes in (as much as entries) you take this image object again, and update its value.

its kinda like this (foreach)

  • Image i set your caption to foo
  • Image i set your caption to bar
  • Image i set your caption to baz

and at the end of cycle your image caption value is baz because that is the last array element.

1 like
Previous

Please or to participate in this conversation.