.
hi optional,
many thanks for taking the time of looking into this, it was much appreciated!
it certainly WORKS !
a very simple solution (many times the simpler solutions are the more elegant), which resolves totally my current problem, and I am very happy with it.
however, as this needs to have already the text in an array form exactly, I would like to take this a step further, if at all posssible:
if any html text/code, already in lines, was to be re-shuffled line by line, but which was not already in an array form, meaning:
not already available like this:
'<p><a href="http://mydomain.com/index.html">Hello World</a></p>',
'<p><a href="http://mydomain.com/index2.html">Hello World 2</a></p>',
'<p><a href="http://mydomain.com/index3.html">Hello World 3</a></p>',
but available like this:
<p><a href="http://mydomain.com/index.html">Hello World</a></p>
<p><a href="http://mydomain.com/index2.html">Hello World 2</a></p>
<p><a href="http://mydomain.com/index3.html">Hello World 3</a></p>
so:
how would any html text/code in lines, as above, already residing within the script,
ex:
$contents = "
<p><a href=http://mydomain.com/index.html>Hello World</a></p>
<p><a href=http://mydomain.com/index2.html>Hello World 2</a></p>
<p><a href=http://mydomain.com/index3.html>Hello World 3</a></p>
"
or ex:
$contents = "
<p><a href="http://mydomain.com/index.html">Hello World</a></p>
<p><a href="http://mydomain.com/index2.html">Hello World 2</a></p>
<p><a href="http://mydomain.com/index3.html">Hello World 3</a></p>
"
be processed into a proper array and then shuffled line by line??
I was trying hard going the way of "explode" but with no success, apparently doing something very wrong.
many thanks for any ideas on this!
best,
heisje
.