forgetabout Posted October 4, 2006 Report Share Posted October 4, 2006 Ir piemēram teksts xaaay mainīgajā $x Kā es varētu dabūt citā mainīgajā tekstu kurš ir starp x un y ? :) Link to comment Share on other sites More sharing options...
andrisp Posted October 4, 2006 Report Share Posted October 4, 2006 $string = 'asdasdxsaddfdsfyas'; $sp = '/x(.*?)y/ism'; preg_match( $sp, $string, $m ); echo $m[1]; Šis atgriezīs tikai pirmo sakritību. Link to comment Share on other sites More sharing options...
Recommended Posts