[ create a new paste ] login | about

Link: http://codepad.org/mgfZG2I3    [ raw code | output | fork ]

PHP, pasted on Apr 18:
<?php
	$strOrigin = "Hello World!!!";
	$strToken = "world";

	$pStrPos1 = strstr($strOrigin, $strToken);
	$pStrPos2 = stristr($strOrigin, $strToken);

	if($pStrPos1 == TRUE)
	{
		echo $pStrPos1;
	}
	else
	{
		echo "pStrPos1 not found\n";
	}
	if($pStrPos2 == TRUE)
	{
		echo $pStrPos2;
	}
	else
	{
		echo "pStrPos2 not found\n";
	}
?>	


Output:
1
2
pStrPos1 not found
World!!!	


Create a new paste based on this one


Comments: