-Extreme newbie teaching self PHP-
I am looking for a way to do the following :
- Take a variable $delete from user input
- Search an array for $delete and, if found, remove the value from the array.
I’ve tried the following (we’ll say $array has the data “order1111”, “order2222”, “order3333” and $delete=“order1111”) :
[php]foreach($array as $index=>$order)
For whatever reason this doesn’t check to see if $order=$delete, it sets $order=$delete and doesn’t remove the value from the array.
Any help is appreciated. Thanks in advance.