do inside a variable
Posted: Sat Nov 15, 2003 5:08 am
Is there any way to put a do{} inside a variable?
Like:
i know that doesn't work, but is there any way to make it work?
Like:
Code: Select all
$x = do {echo "something";} while ($y==1);Code: Select all
[i]Why?.... read on[/i]
<?php
function cwinsfunc($arg) {
//This is where there is some code
$x = 1;
return <<<EOF
This is a load of HTML<br>
PHP will only replace variables, nothing else<br>
echo ("hi") will return echo ("hi")<br>
$x will return 1<br>
<b>Bold Text</b><br>
<br>
So obviously i cant put a do in here
EOF;
}