strstr function demo : strstr « String « PHP
- PHP
- String
- strstr
strstr function demo
<?php
$haystack = 'is a test';
$pos = strstr ($haystack, 'is');
if (!$pos)
echo "String not found\n";
else
echo "String found: $pos\n";
?>
Related examples in the same category