phppaper Posted December 31, 2009 Share Posted December 31, 2009 Hello, How do you extract part of string from a string? Example: The string: "Hello world" and I just want "llo wor" from it?? Many Thanks Link to comment https://forums.phpfreaks.com/topic/186788-extract-part-of-string-from-a-string/ Share on other sites More sharing options...
Daniel0 Posted December 31, 2009 Share Posted December 31, 2009 See substr. Link to comment https://forums.phpfreaks.com/topic/186788-extract-part-of-string-from-a-string/#findComment-986376 Share on other sites More sharing options...
phppaper Posted December 31, 2009 Author Share Posted December 31, 2009 substr() consists of the position of the substring, what if I want to extract a string between some letters and I dont know the exact position of the substring?? Thanks!! Link to comment https://forums.phpfreaks.com/topic/186788-extract-part-of-string-from-a-string/#findComment-986379 Share on other sites More sharing options...
Daniel0 Posted December 31, 2009 Share Posted December 31, 2009 How do you know that you specifically want "llo wor"? Link to comment https://forums.phpfreaks.com/topic/186788-extract-part-of-string-from-a-string/#findComment-986381 Share on other sites More sharing options...
phppaper Posted December 31, 2009 Author Share Posted December 31, 2009 How do you know that you specifically want "llo wor"? Lets say the words "Hello world" appears in the string "......Hello world..." but I dont know what is before and after "Hello world" within the String but I know "llo wor" is between "He" and "ld" and so how can I extract "llo wor" from ".....Hello world..." which "..." means some string. Thanks! Link to comment https://forums.phpfreaks.com/topic/186788-extract-part-of-string-from-a-string/#findComment-986388 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.