By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
463,139 Members | 747 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 463,139 IT Pros & Developers. It's quick & easy.

how to take imagename from image path using javascript?

P: 56
I have got image path in javascript from php code.
That is:http://localhost/fotolia/photos/9.jpg
I want to take only photos/9.jpg from that full path.How can i do that?Please help me......

Sep 4 '08 #1
Share this Question
Share on Google+
3 Replies

Expert Mod 5K+
P: 8,639
you can use a regular expression for this.

Sep 4 '08 #2

Expert 5K+
P: 6,050
PHP or JavaScript?

You say 'using javascript' but have posted this in the PHP forum...

Please clarify.
Sep 4 '08 #3

Expert 5K+
P: 5,058

Take a look at the basename function.
Sep 4 '08 #4

Post your reply

Sign in to post your reply or Sign up for a free account.