Hi,
*** PROBLEM FIXED ***
My 3rd topic... wow this is a record for me in this board... anyways,
I have this code:
It's written quickly, so it's not very good ... but...
I want it to go through the entire string, $tutorial, and what it's searching for is this:
:code.1:
And it's trying to take the number out of that sub string. It works GREAT for the first occurance of :code.1
but does not continue.
Any help appreciated,
-Matt
*** PROBLEM FIXED ***
My 3rd topic... wow this is a record for me in this board... anyways,
I have this code:
PHP:
while (strpos($tutorial, ":code.", $i) > 0)
{
//These echo() statements are for my debugging purposes
//echo($i."<BR>");
$i = strpos($tutorial, ":code.", $i) + 6;
//echo($i." ");
$ii = strpos($tutorial, ":", $i); + 1;
//echo($ii." ");
$idnum = substr($tutorial, $i, $ii - $i);
//echo("~".$idnum."~ ... ");
//************************
//Thanks, dabb, for pointing the below line of code out. LOL.
exit;
}
It's written quickly, so it's not very good ... but...
I want it to go through the entire string, $tutorial, and what it's searching for is this:
:code.1:
And it's trying to take the number out of that sub string. It works GREAT for the first occurance of :code.1
Any help appreciated,
-Matt
Last edited:



