Home  >  Article  >  Backend Development  >  Ask about thinkphp function problem

Ask about thinkphp function problem

WBOY
WBOYOriginal
2016-12-01 01:27:371578browse

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>

Ask about thinkphp function problem

<code>        
 <?php   }
 ?></code>

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>
  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

Statement:
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