How to split a string and find the occurence of one string in another?

webpro_ir

New Member
I need to figure out how to do some C# code in php, and im not sure exactly how. so first off i need the Split function, im going to have a string like \[code\]"identifier 82asdjka271akshjd18ajjd" \[/code\]and i need to split the identifier word from the rest. so in C#, i used string.Split(new char{' '}); or something like that (working off the top of my head) and got two strings, the first word, and then the second part.. i understand that the php split function has been deprecated as of PHP 5.3.0.. so thats not an option, what are the alternatives?and im also looking for a \[code\]IndexOf\[/code\] function, so if i had the above code again as an example, i would need the location of \[code\]271\[/code\] in the string, so i can generate a substring.
 
Back
Top