Board index   FAQ   Search  
Register  Login
Board index php forum :: php coding PHP coding => General

How to remove beginning up to end of searched 2 characters?

Ask about general coding issues or problems here.

Moderators: macek, egami, gesf

How to remove beginning up to end of searched 2 characters?

Postby Momar » Sun May 18, 2014 7:23 pm



How to remove the character from https up to posts/

The output will be
320187951230342
3092918u0598120
395319342109292
Momar
New php-forum User
New php-forum User
 
Posts: 2
Joined: Mon Jun 24, 2013 8:14 am

Re: How to remove beginning up to end of searched 2 characte

Postby us2rn4m2 » Fri May 23, 2014 1:26 pm

Code: Select all
$url = 'https://www.fb.com/SmilePg/posts/320187951230342';
echo substr(strrchr($url, '/'), 1);  // 320187951230342


http://www.php.net/manual/en/function.parse-url.php
http://www.php.net/manual/en/book.strings.php
us2rn4m2
New php-forum User
New php-forum User
 
Posts: 17
Joined: Thu Aug 09, 2012 1:28 pm


Return to PHP coding => General

Who is online

Users browsing this forum: Majestic-12 [Bot] and 1 guest

Sponsored by Sitebuilder Web hosting and Traduzioni Italiano Rumeno and antispam for cPanel.