Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PHP

Print all before characters once string found | matched string return

$headTag = "25%";
if(strpos($headTag, '%') !== false) {
	echo substr($headTag, 0 ,strpos($headTag, '%')); //25
}
$headTag = "100%";
if (strpos($headTag, '%') !== false) {
	echo substr($headTag, 0 ,strpos($headTag, '%')); //100
}
 
PREVIOUS NEXT
Tagged: #Print #characters #string #matched #string #return
ADD COMMENT
Topic
Name
5+6 =