在我的数据库中使用以下查询:
<table>
<tr>
<th>id_slider</th> <th>id_multimedia</th> <th>path_m</th>
</tr>
<tr><td>3 </td> <td>2</td> <td>cartello1482507814.jpg</td> </tr>
<tr><td>3</td> <td>3</td> <td>0open1482511822.jpg</td> </tr>
<tr><td>3</td> <td>4</td> <td>gioco barabba.jpg</td> </tr>
<tr><td>4</td> <td>2</td> <td>cartello1482507814.jpg</td> </tr>
<tr><td>4</td> <td>3</td> <td>0open1482511822.jpg </td> </tr>
</table>
我使用结果数据创建了下表:
<div id="myCarousel" class="carousel slide" data-ride="carousel">
<!-- Indicators -->
<ol class="carousel-indicators">
<li data-target="#myCarousel" data-slide-to="0" class="active"></li>
<li data-target="#myCarousel" data-slide-to="1"></li>
<li data-target="#myCarousel" data-slide-to="2"></li>
<li data-target="#myCarousel" data-slide-to="3"></li>
</ol>
<!-- Wrapper for slides -->
<div class="carousel-inner" role="listbox">
<div class="item active">
<img src="https://www.repstatic.it/content/nazionale/img/2015/11/26/121631321-63ff8328-4925-4ee2-9ff5-a81974b7074e.jpg" alt="Chania" width="460" height="345">
<div class="carousel-caption">
</div>
</div>
<div class="item">
<img src="https://www.repstatic.it/content/nazionale/img/2015/11/26/121631321-63ff8328-4925-4ee2-9ff5-a81974b7074e.jpg" alt="Chania" width="460" height="345">
<div class="carousel-caption">
</div>
</div>
<div class="item">
<img src="https://www.repstatic.it/content/nazionale/img/2015/11/26/121631321-63ff8328-4925-4ee2-9ff5-a81974b7074e.jpg" alt="Flower" width="460" height="345">
<div class="carousel-caption">
</div>
</div>
<div class="item">
<img src="https://www.repstatic.it/content/nazionale/img/2015/11/26/121631321-63ff8328-4925-4ee2-9ff5-a81974b7074e.jpg" alt="Flower" width="460" height="345">
<div class="carousel-caption">
</div>
</div>
</div>
<!-- Left and right controls -->
<a class="left carousel-control" href="#myCarousel" role="button" data-slide="prev">
<span class="glyphicon glyphicon-chevron-left" aria-hidden="true"></span>
<span class="sr-only">Previous</span>
</a>
<a class="right carousel-control" href="#myCarousel" role="button" data-slide="next">
<span class="glyphicon glyphicon-chevron-right" aria-hidden="true"></span>
<span class="sr-only">Next</span>
</a>
</div>
结果得到两个滑块蒙特图像的路径。
如何使用php正确打印两个滑块?
滑块必须这样做
<ListView HasUnevenRows="true" x:Name="note_list" HorizontalOptions="FillAndExpand" HeightRequest="50" ItemSelected="note_clicked">
<ListView.ItemTemplate>
<DataTemplate>
<ViewCell>
<StackLayout Margin="10, 0, 0, 0" HorizontalOptions="FillAndExpand" Orientation="Vertical" VerticalOptions="Fill">
<StackLayout Margin="10 ,10, 10, 0" Orientation="Horizontal" HorizontalOptions="FillAndExpand">
<Image IsVisible="{Binding responseRequired, Mode=TwoWay}" Source="icons/blue/warning" WidthRequest="20" HorizontalOptions="Start" Margin="0, 0, 0, 0"></Image>
<Label HorizontalOptions="Start" Margin="0, 0, 0, 0" FontSize="18" VerticalOptions="CenterAndExpand" Text="{Binding userId , Mode=TwoWay}"></Label>
<Label HorizontalTextAlignment="End" VerticalOptions="Center" HorizontalOptions="EndAndExpand" TextColor="#c1c1c1" FontSize="14" Text="{Binding daysFromPost , Mode=TwoWay}"></Label>
</StackLayout>
<StackLayout HorizontalOptions="Fill" Orientation="Vertical" Margin="10, -5, 10, 10">
<StackLayout HorizontalOptions="StartAndExpand" Orientation="Horizontal" Margin="0, -2, 0, 0">
<Label FontSize="14" TextColor="#c1c1c1" Text="to: "></Label>
<Label HorizontalOptions="StartAndExpand" FontSize="14" TextColor="#c1c1c1" Text="{Binding noteToo, Mode=TwoWay}"></Label>
</StackLayout>
<Label FontSize="14" TextColor="Gray" Text="{Binding note, Mode=TwoWay}"></Label>
</StackLayout>
</StackLayout>
</ViewCell>
</DataTemplate>
</ListView.ItemTemplate>
</ListView>