<section class="sptb ai-power-tool" id="ai_tool" style="background-color: #ddd;">
    <div class="container">
        <div class="row">
            <div class="col-sm-6">
                <div class="section-title">
                    <h2><?php echo $heading['title']; ?></h2>
                </div>
                <p class="lead"><?php echo $heading['paragraph']; ?> </p>
                <?php include 'button.php'; ?>
            </div>
            <div class="col-sm-6">
                <div class="row">
                    <?php
                    $all_ai_tool_data = json_decode($course->course_ai_tools, true);
                    foreach ($all_ai_tool_data as $key => $ai_tool):
                        $this->db->where('cr_id', $ai_tool);
                        $imageData = $this->db->get('course_resource')->row(); 
                    ?>
                        <div class="col-sm-3 col-6">
                            <div class="image-border">
                                <img src="<?php echo base_url() ?><?php echo $imageData->cr_image; ?>" alt="<?php echo $imageData->cr_name; ?>">
                            </div>
                        </div>
                    <?php endforeach; ?>

                </div>
            </div>
        </div>
    </div>
</section>