Search
 
SCRIPT & CODE EXAMPLE
 

PHP

php explode and get first value

$beforeDot = array_shift(explode('.', $string));
$beforeDot = current(explode(".", $string));

// PHP <= 5.3:
$beforeDot = explode(".", $string);
$beforeDot = $beforeDot[0];
Comment

PREVIOUS NEXT
Code Example
Php :: laravel get current user id 
Php :: @yield laravel 
Php :: connexion à la base de donnée microsoftsqlserver avec php 
Php :: php else 
Php :: cors header ‘access-control-allow-origin’ missing IN PARTICULAR CAKEPHP API 
Php :: laravel route model binding 
Php :: functions.php not working wordpress 
Php :: create a button add in laravel 
Php :: laravel update method 
Php :: create qr code png image of 200*200 using phpqrcode 
Php :: laravel log query for model (full) 
Php :: Update Data Multiple Columns MySql Database Table PHP Function 
Php :: download image from mysql using php 
Php :: php find all subclasses of class 
Php :: php function use 
Php :: laravel validation messages 
Php :: how to get full path of uploaded file in php 
Php :: Logging a Massage php 
Php :: auth user with relation laravel 
Php :: if user not signed in redirected to login laravel from route 
Php :: where is view folder in laravel 
Php :: date comparison function in php 
Php :: laravel dependency injection 
Php :: php delete file 
Php :: how do i use php read excel file 
Php :: query builder codeigniter 
Php :: How to add .active class to active menu item 
Php :: xampp downgrade php 
Php :: php string remove last character 
Php :: auto logout when session expires laravel 
ADD CONTENT
Topic
Content
Source link
Name
4+9 =