in Education by
Echo $var gives me something like http://342.234.243.142/data/somethingmore/ IP-address everytime is different. Instead of "somethingmore" can something like "/folder/images/2011/gallery/file.jpg" (anything) How do I strip from this string part with the ip and /data/ folder? $var could become /somethingmore/ JavaScript questions and answers, JavaScript questions pdf, JavaScript question bank, JavaScript questions and answers pdf, mcq on JavaScript pdf, JavaScript questions and solutions, JavaScript mcq Test , Interview JavaScript questions, JavaScript Questions for Interview, JavaScript MCQ (Multiple Choice Questions)

1 Answer

0 votes
by
$url = 'http://342.234.243.142/data/somethingmore/'; echo basename($url);

Related questions

0 votes
    How can i replace a string that contain symbol to a class css? HTML JQUERY p= '@.class-two'; $( ... , JavaScript Questions for Interview, JavaScript MCQ (Multiple Choice Questions)...
asked May 7, 2022 in Education by JackTerrance
0 votes
    This question already has answers here: Find and replace strings in vim on multiple lines (11 answers) Vim ... Questions for Interview, JavaScript MCQ (Multiple Choice Questions)...
asked Apr 16, 2022 in Education by JackTerrance
0 votes
    Today I found out that putting strings in a resource file will cause them to be treated as literals, ... Questions for Interview, JavaScript MCQ (Multiple Choice Questions)...
asked Mar 11, 2022 in Education by JackTerrance
0 votes
    Today I found out that putting strings in a resource file will cause them to be treated as literals, ... Questions for Interview, JavaScript MCQ (Multiple Choice Questions)...
asked Mar 11, 2022 in Education by JackTerrance
0 votes
    Today I found out that putting strings in a resource file will cause them to be treated as literals, ... Questions for Interview, JavaScript MCQ (Multiple Choice Questions)...
asked Mar 11, 2022 in Education by JackTerrance
0 votes
    what does public String replaceAll(string replace) do? (a) Replace all characters that matches pattern with a ... Expressions of Java Select the correct answer from above options...
asked Feb 24, 2022 in Education by JackTerrance
0 votes
    what does public String replaceAll(string replace) do? (a) Replace all characters that matches pattern with ... Questions for Interview, JavaScript MCQ (Multiple Choice Questions)...
asked Oct 24, 2021 in Education by JackTerrance
0 votes
    I have a List : Old_list =['orders_ce_deduped.01.csv','orders_ce_deduped.02.csv'] I need to get the 01 and 02 part ... = ['01','02'] Select the correct answer from above options...
asked Jan 19, 2022 in Education by JackTerrance
0 votes
    I have the below string "Halo Device ANumber : 6232123123 Customer ID : 16926" I want to search with the ... 22 substring : Device Select the correct answer from above options...
asked Jan 9, 2022 in Education by JackTerrance
0 votes
    String Slicing means: 1.to convert the string in capital 2.to check whether a string has more than one ... in reverse order computet Select the correct answer from above options...
asked Dec 13, 2021 in Education by JackTerrance
0 votes
    I am using wordpress, and some pages are using page-template, which is almost full HTML without . Now ... Questions for Interview, JavaScript MCQ (Multiple Choice Questions)...
asked Jul 20, 2022 in Education by JackTerrance
0 votes
    import os import sys import fileinput print ("Text to search for:") textToSearch = input( "> " ) ... JavaScript Questions for Interview, JavaScript MCQ (Multiple Choice Questions)...
asked May 26, 2022 in Education by JackTerrance
0 votes
    We are in the process to update an existing WordPress website and imported posts from one site to another. ... Questions for Interview, JavaScript MCQ (Multiple Choice Questions)...
asked May 22, 2022 in Education by JackTerrance
0 votes
    I need to use environment variable "PATH" in yaml file which needs to be parsed with a script. ... JavaScript Questions for Interview, JavaScript MCQ (Multiple Choice Questions)...
asked May 10, 2022 in Education by JackTerrance
0 votes
    We are in the process to update an existing WordPress website and imported posts from one site to another. ... Questions for Interview, JavaScript MCQ (Multiple Choice Questions)...
asked May 7, 2022 in Education by JackTerrance
...