Jump to content

clearing the link id


manalnor

Recommended Posts

Hello friends,

 

if we have

 

$id = 39827-key1-key2-key3

 

and we want to show only the number or anything before (-)

then by using

 

$realid = array_shift(explode("-", $id));

 

we will get 

echo $realid; // 39827

 

Now my problem is as following !

 

if we have

$id = key1/key2

and i want on something that remove the whole part  key1/ and gives me only key2

 

how can i do it

Link to comment
https://forums.phpfreaks.com/topic/244753-clearing-the-link-id/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.