i have a script is like this
if(strtolower($command) == "s") {
$result = ig($options);
for($i=0; $i < count($result); $i++) {
$ImageCarouselTemplateBuilder = new \LINE\LINEBot\MessageBuilder\TemplateBuilder\ImageCarouselTemplateBuilder([
new \LINE\LINEBot\MessageBuilder\TemplateBuilder\ImageCarouselColumnTemplateBuilder($result[$i],
new \LINE\LINEBot\TemplateActionBuilder\UriTemplateActionBuilder('Buka Browser',$result[$i])),
]);
}
$templateMessage = new \LINE\LINEBot\MessageBuilder\TemplateMessageBuilder('nama template',$ImageCarouselTemplateBuilder);
$result = $bot->replyMessage($event['replyToken'], $templateMessage);
return $result->getHTTPStatus() . ' ' . $result->getRawBody();
}
as you can see, I keep the loops in the line 3, with the number of loops corresponding to the count of my function (3 loops), but the script does not run perfectly, the result of the above script only responds to the first loop object only, for the second and thirdly there is no response. is there any suggestion to solve this problem?
the results I get from the script above is like in the picture below
and I want the response as in the picture below
return
ing inside the loop.