theweirdone Posted June 29, 2006 Share Posted June 29, 2006 Ok, so what I'm trying to do is to check a string ($song) for apostrophes (donno how to spell it, this thing: " ' ") and put a backslash in front of it... I'm not too sure about how I go around doing it. I've created a function which is suppose to break up the string into an array.I'm having trouble with this, I've tried using split(), but I don't want it to split with a pattern, I want it just to split every character into a seperate subset of the array.. Is that possible, or is there another way for me to go about doing this? Any help is appreciated... Quote Link to comment https://forums.phpfreaks.com/topic/13238-string-to-array/ Share on other sites More sharing options...
Buyocat Posted June 29, 2006 Share Posted June 29, 2006 Be a little more specific, what is it that you're trying to do? It sounds like you're just trying to stripslashes ??? Otheriwse str_split will convert a string to an array. You could also try eregi_replace to replace ' with \' if that is what you'd like. (if that was the wrong slash just use the right one) At any rate read about these functions if you have more questions at php.net. Quote Link to comment https://forums.phpfreaks.com/topic/13238-string-to-array/#findComment-50964 Share on other sites More sharing options...
theweirdone Posted June 29, 2006 Author Share Posted June 29, 2006 that will work nicely... thanx... Quote Link to comment https://forums.phpfreaks.com/topic/13238-string-to-array/#findComment-50974 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.