Voting

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

The Note You're Voting On

nikolai dot wuestemann at t-online dot de
14 years ago
If you want to have a string BETWEEN two strings, just use this function:

<?php
function get_between($input, $start, $end)
{
$substr = substr($input, strlen($start)+strpos($input, $start), (strlen($input) - strpos($input, $end))*(-1));
return
$substr;
}

//Example:

$string = "123456789";
$a = "12";
$b = "9";

echo
get_between($string, $a, $b);

//Output:
//345678
?>

<< Back to user notes page

To Top