Return the split value if the user had entered the path else return blank
问题 I need to display the name and split path of the path entered by a user dynamically. For that, I had split the path entered by the user and grab only certain part of it. For e.g. if the user enters path as: /content/mypath/myfolder/about/images/abc.jpg Then I am displaying images/abc.jpg. However, let's say the user only enters the name and doesn't enter the path, at least the name should be applied & displayed in that case. But it displays 0 everytime I enter a path. How do I fix this? $