0
I need to take all 'SD' characters from inside a string I am using the php strpos function and then making a substr in the position found in the string, but I need to take all because the position is varied.
//trazendo a darkness do template no banco
$label = substr($qry['label_tpl_content'],7,5);
$labels = substr($qry['label_tpl_content'],15,5);
echo "<br>";
$pos = strpos($qry['label_tpl_content'],"SD");
echo $pos;
echo "<br>";
echo $label."<br>";
this variable comes some more or less like this
XA 35~SD10N T0~SD13 for example, but not always in the same position.
You want to know how often the word 'sd' appears, or its positions?
– Wictor Chaves
you want to count the number? or you want to remove the occurrences?
– Wees Smith