Created
September 1, 2016 06:54
-
-
Save mysiar/3f1d02134685c467897745c557a4dafb to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public function del_slow($id) { | |
$offset = 0; | |
foreach ($this->products as $p) { | |
if ($p->getId() == $id) { | |
array_splice($this->products, $offset, 1); | |
break; | |
} | |
$offset++; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment