•  
     

unset() - Remover o Python do Array - PHP

Código: Selecionar todos

<html>
  <head>
    <title>unset() - Remover o Python do Array - PHP</title>
  </head>
  <body>
    <p>
      <?php
        $languages = array("HTML/CSS",
        "JavaScript", "PHP", "Python", "Ruby");

        unset($languages[3]);
        
        foreach($languages as $lang) {
          print "<p>$lang</p>";
        }
      ?>
    </p>
  </body>
</html>


Resultado HTML
HTML/CSS

JavaScript

PHP

Ruby