Ho bisogno una funzione che mi faccia quello che ho scritto nel titolo. Ne ho scritta una ma purtroppo non funziona, non sono un asso con le stringhe...
Questa è quella che ho scritto:
Da notare il nome in stile AutoITCodice PHP:
function StringBetween($str, $sx, $dx) {
$pos_sx = strpos($str, $sx);
$len_sx = strlen($dx);
$pos_be = $pos_sx + $len_sx;
$pos_dx = strpos($str, $dx);
$len_be = $pos_dx - $pos_be;
return substr($str, $pos_be, $len_be);
}
![]()
![]()