explode - loop to find all pieces
Posted: Sun Jun 21, 2009 5:51 am
Hi there!
I am using a $piece = explode('.', $something); and I was wondering about how I make a loop that makes it unnecessary to do like this:.. When I don't know how many pieces I can end up with.
I am using a $piece = explode('.', $something); and I was wondering about how I make a loop that makes it unnecessary to do like this:
Code: Select all
if($piece[0] == $_POST['something'] || $piece[1] == $_POST['something'] || $piece[3] == $_POST['something']) {
// something
}