Tuesday 15 June 2010

How to get the part of string coming after first word and underscore from the given string in PHP? -


निम्नलिखित एक चर है जिसमें स्ट्रिंग है:

  $ msg = 'file_fafe9add9c26415689ffcfbc000d7751.docx ';  

मुझे नीचे फ़ाइल नाम से प्रारंभिक भाग ( अर्थात फ़ाइल _ ) नहीं चाहिए इसे निम्नानुसार आना चाहिए:

  $ msg = 'fafe9add9c26415689ffcfbc000d7751.docx';  

मैं इसे एक कुशल और सर्वोत्तम तरीके से PHP में कैसे प्राप्त करूं?

अग्रिम धन्यवाद।

  str_replace ('file_', '', $ msg)  

No comments:

Post a Comment