a.d.b.
-
Posts
2 -
Joined
-
Last visited
Never
Posts posted by a.d.b.
-
-
I have tried to search the forums, but no luck. ???
I am trying to devide a text by using the php split function. This is all good, except from the fact that I need to split it by ";;VARIABLETEXT;", meaning I need to split it by double semicolons followed by a text that varies followed by another semicolon.
I am trying with split( ";;%;" , $data1 );
but because of my lack of php-experience, I am basically stuck. Any easy solution to this problem? I have also tried with the explode() function and the preg_split().
Please, help a php newbie out, thanks
Audun
help with split()
in PHP Coding Help
Posted
however, when I used the
split(";;\w*;" , $data1 );
it split the text where "[b];;;[/b]" was found (as I would expect, and need to happen :), because it sometimes is no text between ;; and ; ), but it didn't split the text where ";;somevariabletext;". I do not know if it is relevant, but the variable text is in fact an url, like this: "[b];;[/b]http://www.variable.com/variblename.variableextention[b];[/b]".
an example of the text would be "audun is doing his homework[b];;[/b]http://www.audun.com/test.php[b];[/b]whenever he feels like it"
Am I doing it all wrong? Thanks,
Audun