Okay I have a whole bunch of different strings in an array. The strings are basically like this
<td class="gSGRowEven">
09/02/1983</td>
I need to pull out the information that is bolded.
How can I do this? I looked into preg matching, but I am not 100% sure how to do this.
how to split up a string
Moderator: General Moderators
Code: Select all
preg_match_all("#<td class=\"gSGRowEven\">(.+?)</td>#m",$text_youre_searching,$matches)$matches[0] will be the full matches.. ie <td class="gSGRowEven">whatever</td>
$matches[1] will be what you're looking for, the stuff inbetween <td></td>
Set Search Time - A google chrome extension. When you search only results from the past year (or set time period) are displayed. Helps tremendously when using new technologies to avoid outdated results.
change it to (Even|Odd) in the regex
then what you're looking for will be in $matches[2]
then what you're looking for will be in $matches[2]
Set Search Time - A google chrome extension. When you search only results from the past year (or set time period) are displayed. Helps tremendously when using new technologies to avoid outdated results.