I'm relatively new to PHP, and I'm currently trying to understand the `explode` function. I've come across a specific use case that I'm having trouble with.
I have a string that contains multiple words separated by an asterisk (`*`). I know that `explode` is typically used to split a string into an array using a specified delimiter, but how can I use it to split a string using an asterisk?
For example, let's say I have the following string: "apple*banana*cherry". I want to split this string into an array so that each element contains each fruit separately. How can I achieve this with `explode`?
I've tried using the asterisk as the delimiter directly (`explode("*", $string)`), but it doesn't seem to work properly. It just returns the original string as a single element in the resulting array.
I'd greatly appreciate it if someone could guide me on how to handle this situation correctly. Is there a specific regular expression or additional steps I need to consider to make `explode` work with asterisks?
Thank you in advance for your help!