Hello. Though I understand a little bit of php, but I cannot make one condition.
There is a variable $name which stores random values, on the basis of which I create a link (via echo )
<a href='/artist/".$name."'>".$name."</a>
When a single name is stored in a variable, for example Adel , then everything is fine, the link is formed with the correct <a href='/artist/Adel'>Adel</a>
But if there are several names in the variable, for example, Adel feat. Cher feat. 1GN Adel feat. Cher feat. 1GN Adel feat. Cher feat. 1GN then follow the link <a href='/artist/Adel feat. Cher feat. 1GN'>Adel feat. Cher feat. 1GN</a> <a href='/artist/Adel feat. Cher feat. 1GN'>Adel feat. Cher feat. 1GN</a> <a href='/artist/Adel feat. Cher feat. 1GN'>Adel feat. Cher feat. 1GN</a> will not work.
Now we go to the task itself, how to make the condition IF ELSE, so that there would be a check before creating the link. If the variable contains names with feat. then make a few links. 1 link - to feat., The second - after, etc.
What would happen on the similarity:
<a href='/artist/Adel'>Adel</a> feat. <a href='/artist/Cher'>Cher</a> feat. <a href='/artist/1GN'>1GN</a>
All the day I break my head ... I would be very grateful for any help !!
explode()and an output loop to help you. - teran