That is odd. I'm not sure why there would be an extra array element like that. You should see it using the print_r and echo statements in the original php code I gave you. You can always fall back on your php knowledge and add a test for that in the php when creating the $explode_stars array. I would do it in the php if you expect you might have to do more programming for other cases later. You can look at
example 2 here to see how to filter the array in php for blanks.
Or. just add another condition in the smarty that won't let anything print if the value is empty - maybe this will work:
Code:
{if $explode_stars[star_name] ne ""}
{if $smarty.section.star_name.index ne 0 }, {/if}<a href="search.php?mode=search&by_title=on&by_shortdescr=on&by_fulldescr=on&by_sku=on&category_main=on &category_extra=on&search_in_subcategories=on&substring={$explode_stars[star_name]}">{$explode_stars[star_name]|replace:' ':'+'}</a>
{/if}
If you can do the search you want on your advanced search page - just
use the tip I gave you earlier to get the URL for the link. In advanced search, you can set up the criteria over which you want to search, and it will provide the URL.