update page now
Longhorn PHP 2026 - Call For Papers

Voting

: max(two, three)?
(Example: nine)

The Note You're Voting On

Anonymous
3 years ago
needle: /       
string: o/a/i

if before_needle is 1  then needle is excluded: "o/a"
if before_needle is false  then needle is included:  "/i" 

as code:

$str="o/a/i";
$cs="/";

echo "if before_needle == 1  then needle is excluded"."\n";
$str="o/a/i";
$cs="/";
echo mb_strrchr ($str,$cs,1)."\n";

echo "if before_needle == false  then needle is included"."\n";
$str="o/a/i";
$cs="/";
echo mb_strrchr ($str,$cs,0)."\n";

<< Back to user notes page

To Top