Home > Backend Development > PHP Tutorial > Ask about thinkphp function problem

Ask about thinkphp function problem

WBOY
Release: 2023-03-02 12:08:01
Original
1632 people have browsed it

I want to remove the first 2 amounts and keep the last 3 groups. How to change it?

Ask about thinkphp function problem

Ask about thinkphp function problem

Reply content:

I want to remove the first 2 amounts and keep the last 3 groups. How to change it?

Ask about thinkphp function problem

Ask about thinkphp function problem

If you want it to be simple, just change it like this

<code><?php
    $number=$number+1;
    if($number>2){  ?>
    
         </code>
Copy after login

Ask about thinkphp function problem

<code>        
 <?php   }
 ?></code>
Copy after login

You can take a look at the ThinkPHP volist related documents. Do it yourself, have enough food and clothing, check the official documents first, and then google.

You should have two ways to solve this problem:

  1. Modify volist and set offset.

    <code><volist name="list" id="vo" offset="5" length='10'>
    {$vo.name}
    </volist></code>
    Copy after login
  2. Modify Model data acquisition, use SQL, or PHP logic to skip the first two pieces of data.

Just modify the attribute value of volist or remove the first 2 pieces of data when getting the value in the background

Related labels:
php
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template