Filter the first result of PHP explodes function and present in a structure

Asked

Viewed 26 times

0

How can I delete the first result from the explode. Converting to array, $separa[0]; I can filter, but with difficulty to eliminate it from the foreach structure.

Example:

$separa = explode(",", $row['referencia']);  

$separa[0]; //obtenho o primeiro resultado

foreach($separa as $ref ) : 

      echo$ref; //imprimir sem o $separa[0]; (primeiro resultado)
;

1 answer

2


Try:

unset($separa[0]);

And do the foreach

  • It worked, thank you Mastria.

Browser other questions tagged

You are not signed in. Login or sign up in order to post.