Anthony Ritter wrote:
Greetings-
I'm have the follwing string called $text and throughout this string I'd
like to split this into an array by calling spliti() at the tag called
PAGEBREAK.

So, I count the array elements starting at 0 and get to 9.

When I call count(), I get 11. Could somebody please explain why this is?
Thank you.
TR
.................

<?
$text="

aaa[PAGEBREAK] //this is the 0 element
bbb[PAGEBREAK] //[1]
ccc[PAGEBREAK] //[2]
ddd[PAGEBREAK] //[3]
eee[PAGEBREAK] //[4]
fff[PAGEBREAK] //[5]
ggg[PAGEBREAK] //[6]
hhh[PAGEBREAK] //[7]
iii[PAGEBREAK] //[8]
jjj[PAGEBREAK] //...and this is the 9th element

";

There are 10 '[PAGEBREAK]' substrings in the string. If the string is split apart at these substrings, it will give you total 11 parts.


--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Reply via email to