Lets say I have a string $theNumbers = "5,7,9,11";
How can I get PHP to recognize each number before a comma, strip it out, and display that number as a url.
For instance if theNumbers had the value of 5,7,9,11 like above the following URLs would be echoed out:
<a href="whatever.php?number=5">Go 5</a>
<a href="whatever.php?number=7">Go 7</a>
<a href="whatever.php?number=9">Go 9</a>
<a href="whatever.php?number=11">Go 11</a>
$theNumbers isn't always going to be the same values or the same number of values.
In another instance, for example, $theNumbers = "1,2,3";
Again, I would need PHP to echo out URLs for the numbers in that value.
<a href="whatever.php?number=1">Go 1</a>
<a href="whatever.php?number=2">Go 2</a>
<a href="whatever.php?number=3">Go 3</a>
Any help is greatly appreciated. Thanks!