How to build a text carosuel with Kirby

I have created a testimony carousel which I am now making dynamic with Kirby. I am getting an unexpected token error because my syntax is wrong. With my blueprint I think when I do get it working, I will not be able to add additional testimonies later down the line, so how do I add multiple text fields with the same label?

  testamonialText:
    label: Testamonial Text
    type: text
    size: small
    width: 2/3
  testamonialName:
    label: Testamonial Text
    type: text
    size: small
    width: 1/3

    <div id="testical-carousel" class="carousel slide" data-ride="header-carousel-ride">
         <?php $n=0; foreach($page->testamonialText()): $n++; ?>
            <div class="carousel-inner col-md-8 col-sm-12">
                <div class="item<?php if($n==1) echo ' active' ?>">
                    <h2 class="">
                        <?= $page->testamonialText() ?> 
                    </h2>
                    <p class="">
                        <?= $page->testamonialName() ?> 
                    </p>
                </div>
            </div>
            <?php endforeach ?>
            <div class="testicalArrow col-md-2" href="#testical-carousel" role="button" data-slide="next">
                <div class="arrowRight">
                </div>
            </div>
        </div>

For repeated data you need a structure field.

Syntax error: You cannot loop through a field.

do you have any examples please?

Structure field for multiple testimonials, each with name and text:

testimonials:
  type: structure
  fields:
    name:
      type: text
    text:
      type: textarea

Render that in your snippet/template:

foreach( $page->testimonials()->toStructure() as $testimonial ): ?>
    <div>
        <h1><?= $testimonial->name() ?></h1>
        <?= $testimonial->text()->kirbytext() ?>
    </div>
<?php endforeach

(!) Not tested and for demo only

More about structure fields: Structure | Kirby

Thank you for the help, it worked perfectly!. I changed the code slightly. I will leave it here for reference.

<div id="testical-carousel" class="carousel slide" data-ride="header-carousel-ride">
    <div class="carousel-inner col-md-8 col-sm-12">
        <?php $n=0; foreach( $page->testimonials()->toStructure() as $testimonial ): $n++; ?>
            <div class="item<?php if($n==1) echo ' active' ?>">
                <div>
                    <h2>
                        <?= $testimonial->title() ?>
                    </h2>
                    <p>
                        <?= $testimonial->name() ?>
                    </p>
                </div>
            </div>
        <?php endforeach ?>
    </div>
    <div class="testicalArrow col-md-2" href="#testical-carousel" role="button" data-slide="next">
        <div class="arrowRight">
        </div>
    </div>
</div>