Search
 
SCRIPT & CODE EXAMPLE
 

PHP

php remove after character

$s = 'Posted On April 6th By Some Dude';
echo strstr($s, 'By', true); // Posted On April 6th
Comment

php remove everything after character

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

php remove everything after symbol

$variable = substr($variable, 0, strpos($variable, "By"));
Comment

PREVIOUS NEXT
Code Example
Php :: laravel 7 error npm run dev 
Php :: get thumbnail alt wordpress 
Php :: mysql replace a character in a string 
Php :: php max input vars wordpress wp-config 
Php :: ubuntu 20.04 how to install npm 
Php :: php split string at first space 
Php :: how to get the index in foreach loop in laravel 
Php :: how to redirect with php 
Php :: how to remove index.php in codeigniter 
Php :: laravel format number blade 
Php :: what is app_env in laravel 
Php :: get current term id 
Php :: make a forign key in migrations using laravel 8 
Php :: laravel migrate specific path 
Php :: In Connection.php line 664:SQLSTATE[HY000] [2002] No such file or directory (SQL: select * from information_schema.tables where table_schema 
Php :: wp_query post per page 
Php :: session flush laravel 
Php :: wp wc php if cart page is empty redirect 
Php :: remove add media button wordpress editor 
Php :: Install ext-dom php 7.2 
Php :: laravel find or create new 
Php :: laravel migration change column name 
Php :: symfony clear cache 
Php :: hash a password php 
Php :: using js variable in php 
Php :: php redirect to another page 
Php :: laravel collection shuffle 
Php :: get current month record in laravel 
Php :: phpmyadmin change database import size 
Php :: magento 2 status mode 
ADD CONTENT
Topic
Content
Source link
Name
5+7 =