This is php 101 for sure, but for some reason I can’t find the answer. Not knowing how to word the search might be the problem actually…anyway, here you go.
I need to split strings by spaces.
So I have a form with drop downs to grab a month then a year. I then combine those values and write them to a single DB field. When I retreive them I would like to break them back out into seperate values. I guess I can do this with:
$date = explode(” “, $dates);
foreach($date as $datenum)
{
//alternate values with a counter for year and month
}
…but I seem to remember a built in method of just grabing the value of a string before or after a character (in my case a ” “).
Ugg someone hit me in the head with a shovel or something, why am I blanking on this?