Skip to content
Advertisement

How can i make my delete function work in php

my code was working but i don’t know how to create a delete function i tried my best to search some but it doesn’t fit in this code im still learning the basics and i will really appreciate the help, thank you very much in advance

JavaScript

Advertisement

Answer

Seems like you want to delete a fruit?

You store the fruits in an array called $straw. So if you want to delete one, you need to delete it from that array.

Try this:

JavaScript

That should delete the first entry into the array, and therefore your first fruit.

User contributions licensed under: CC BY-SA
6 People found this is helpful
Advertisement