Answer the question
In order to leave comments, you need to log in
Answer the question
In order to leave comments, you need to log in
<?php
$re = '/<p class="number">(.+)<\/p>/';
$str = '<div class="winning_numbers cleared">
<ul>
<li class="girl1 number4 ">
<p class="number">4</p>
</li>
<li class="girl2 number7 ">
<p class="number">7</p>
</li>
<li class="girl3 number5 ">
<p class="number">5</p>
</li>
<li class="girl4 number8 ">
<p class="number">8</p>
</li>
<li class="girl5 number26 ">
<p class="number">26</p>
</li>
<li class="girl6 number3">
<div class="hider">
<p class="number">3</p>
</div>
</li>
</ul>
</div>';
preg_match_all($re, $str, $matches, PREG_SET_ORDER, 0);
// Print the entire match result
var_dump($matches);
$mcount = preg_match_all('~\<p class=\"number\"\>([0-9]+)\<\/p~is', $str, $matches);
if (count($mcount) > 0)) {
print_r($matches[1]);
}
From the documentation:
> Values of the CHAR type are padded on the right with spaces to the specified length during storage.
That is, you will create problems for yourself with the processing of the TIN in the future.
So, it's better to do VARCHAR(12) and everything will be ok.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question