I have n number of links, each with its own keyword. I would like to show two links at a time, randomly in php. Any suggestion?
Here is input example :
$text[1] = "<a href=https://www.website.ext/post-1/>words 1</a>";
$text[2] = "<a href=https://www.website.ext/post-2/>words 2</a>";
$text[3] = "<a href=https://www.website.ext/post-3/>words 3</a>";
$text[4] = "<a href=https://www.website.ext/post-4/>words 4</a>";
$text[5] = "<a href=https://www.website.ext/post-5/>words 5</a>"
....
output example :
words 1
words 3
or
words 5
words 2
or
words 4
words 1
", array_slice($array, 0,2));` – Andreas Apr 26 '19 at 16:19