I have some data in the following format.
Orange - $3.00
Banana - $1.25
I would like to print this as only as follows:
Orange
Banana
I tried using following code in a loop but the data may have 0 in other places as well. So if I can find 0 only at the end for a specific line.
$pos=strpos($options, "0");
$options = substr($options, 0, $pos)."\n";
Any ideas?