refiking Posted August 28, 2009 Share Posted August 28, 2009 I have a $description variable that comes from my db and I need to parse the variable and delete everything after '<html>' I thought it was explode or implode but quickly found out I was WAAAAY wrong. Can someone point me to the function to use in the php manual because I'm stuck. Thanks! Link to comment https://forums.phpfreaks.com/topic/172219-delete-part-of-a-string/ Share on other sites More sharing options...
Jacobian Posted August 28, 2009 Share Posted August 28, 2009 could you do it with the substr function? http://www.w3schools.com/PHP/func_string_substr.asp Link to comment https://forums.phpfreaks.com/topic/172219-delete-part-of-a-string/#findComment-908023 Share on other sites More sharing options...
refiking Posted August 28, 2009 Author Share Posted August 28, 2009 Not quite because I don't know how many values would be before the <html>. Seems like I remembered a function that can delete everything past a certain substring... Link to comment https://forums.phpfreaks.com/topic/172219-delete-part-of-a-string/#findComment-908034 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.