I want to show a string of text only if the Name URL parameter exists. If it does not, then something else should be shown. However, when I try to do it, I get a parse error. What am I doing wrong?
<?php
$url = 'http://www.example.com/page/?type=software&sortby=title&Name[]=software%3A%20windows&Name[]=version%3A%2010&sortdirection=asc&Name[]=make%3A%20microsoft';
$url_components = parse_url($url);
parse_str($url_components['query'], $params);
$url22 = implode(", ", $params['Name']);
if(!empty($url22)){
echo '<h1>no string</h1>'
}
else {
echo '<h1>yes string</h1>'
}
?>
.....`
– Luuk Aug 23 '20 at 13:59