Search
 
SCRIPT & CODE EXAMPLE
 

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
}
Comment

PREVIOUS NEXT
Code Example
Php :: HTTP Authentication example forcing a new name/password 
Php :: Laravel display the date the participation was created 
Php :: pass array from controller laravel with compact 
Php :: wordpress microformats vs. schema.org 
Php :: laravel carbon subtract minutes to current time 
Php :: php define() 
Php :: Multiple databases user validation in Laravel 
Php :: php Prefix Sum of Matrix (Or 2D Array) 
Php :: get first row of array php 
Php :: utf8 decode 
Php :: cách nhúng php vào html 
Php :: gmail smtp not working laravel 
Php :: php browser detection script 
Php :: wordpress not recognizing function during plugin activation 
Php :: itop cron.php 
Php :: php opencart controller 
Php :: Program to Multiply Two Numbers in php 
Php :: display product page title in field cf7 
Php :: webmin apache php not working 
Php :: PHP 7 PDF page group - sizeof(): Parameter must be an array or an object that implements Countable 
Php :: fichier wp-config.php 
Php :: Determine the percentage of the file uploaded to the server using php 
Php :: chart trong laravel 
Php :: php raw array without foreach 
Php :: laravel 8 app with more than one database 
Php :: upgrade phpopensuse 
Php :: share var in a maser layout laravel 
Php :: hook de pré-commit se déclenche 
Php :: Laravel route returning error 404 when attempt is made to pass value to controller function 
Php :: quiz 
ADD CONTENT
Topic
Content
Source link
Name
2+2 =