Search
 
SCRIPT & CODE EXAMPLE
 

PHP

php remove everything after character

$fullpath = 'folderName/file.ext';
$folder = substr($fullpath, 0, strpos($fullpath, '/'));
echo $folder;
// Output => folderName
Comment

php remove everything after a specific character

$str = 'Posted On April 6th By Some Dude';
echo strtok($str, 'By'); // Posted On April 6th
Comment

PREVIOUS NEXT
Code Example
Php :: first item in array php 
Php :: Use debug bar - Laravel 
Php :: Show all DB Tables in php 
Php :: laravel public access inserver using htaccess 
Php :: php artisan cache 
Php :: laravel collection remove duplicates 
Php :: php json request get value 
Php :: download speed limit php 
Php :: Laravel - create model, controller and migration in single artisan command 
Php :: strlen php 
Php :: form submitting twice 
Php :: add column migration laravel 
Php :: php why " " not new line 
Php :: appending txt file from php 
Php :: how to convert string word to lowercase in php 
Php :: set php path in ubuntu 
Php :: flutter form autadjust height 
Php :: laravel migration change column length 
Php :: downgrade php version vagrant 
Php :: laravel get session variable in controller 
Php :: newline in php 
Php :: php usort keep keys 
Php :: how to take last entry in database in laravel Method ONe 
Php :: How To Clear Laravel.Log In Laravel? 
Php :: how to return with open model popup in laravel 
Php :: strtoupper 
Php :: php pdo select 
Php :: call to a member function connection() on null test laravel 
Php :: php convert minutes to hours and minutes 
Php :: strpos in php 
ADD CONTENT
Topic
Content
Source link
Name
9+3 =