Forum Moderators: coopster
---
text text text text text
text text text
[table-01]
text text text
text text text text text text
text text text text
[table-02]
text text text
---
I need to explode on "[table-01]" and on "[table-02]" (I have these in a seperate array and they are variable. There might be 2 tables, might be 20), so I keep the text blocks in a array. Due to a limitation in a class I'm using, I can't simply use str_replace to insert the tables, so I need to run the resulting array through a loop and echo the tables inbetween.
Thanks in advance for the suggestions!
Stefan
$chunks = [url=http://www.php.net/preg-split]preg_split[/url]("/\[table-\d+\]/", $string);
Try something like that and see if it helps. :)