I have the following function in php it returns me a string from the page so I can do if and else with the returned information, however an error occurs: Parse error: syntax error, unexpected '=' in / storage / ssd3 / 854/1950854 / public_html / config.php on line 22
How can I resolve this? (apparently the line with the error is the name but I do not know how to solve it)
function GetStr($string, $start, $end){
$str = explode($start, $string);
$str = explode($end, $str[1]);
return $str[0];
}
name = "sair";
$valor = GetStr($resultado, 'name='",");
echo $valor;