canelones canelones - 2 years ago 99
PHP Question

Remove first 100 element of variable?

I have this code which stores values in $products. I'm not sure if $products is an array or other thing.

I need to remove the first 100 values.

// Get all products
$products = Product::getProducts(1, 0, 1000000, 'id_product', 'DESC', false, true, $context);

Answer Source
if (is_array($products))
  $products = array_slice($product, 100);

Refer to this page to get in deep.

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download