0
I have the following function in php it returns me a page string so that I can do if and Else with the returned information, but there is an error: Parse error: syntax error, Unexpected '=' in /Storage/ssd3/854/1950854/public_html/config.php on line 22
how can I fix it ? (apparently the line with the error is the name but I don’t know how to fix 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;
Change to
$name
– NoobSaibot