I have a text.
\cf1\i ( Wong v. Tenneco, Inc. (1985) 39 Cal.3d 126, 135 [216 Cal.Rptr. 412, 702 P.2d 570]; Knodel v. Knodel (1975) 14 Cal.3d 752, 765, fn. 15 [122 Cal.Rptr. 521, 537 P.2d 353].)\cf0\i0 This approach was enunciated long ago by Justice Cardozo, who explained that courts will not refuse to enforce a foreign cause of action unless application of the foreign law 'would violate some fundamental principle of justice, some prevalent conception of good morals, some deep-rooted tradition of the common weal.' \cf1\i ( Loucks v. Standard Oil Co. (1918) 224 N.Y. 99, 111 [120 N.E. 198, 202].)\cf0\i0 California case, \cf1\i Bryant v. Mead (1851) 1 Cal. 441\cf0\i0
here: I have
$1st = "\cf1\i";
$2nd = "\cf0\i0";
these two substring. I have to find a string starting with $1st and ending with $2nd in this text though this text is dynamic, and I don't know how many times these two substrings will appear.
I did this : $between=substr($str, strpos($str, $1st) + 6, strpos($str, $2nd) - strpos($str, $1st) + 1);
but I give only the first string.
How can I get all the strings starting with $1st and ending with $2nd in this text?