Cand we apply php constructs, and logic inside php string variable.... like
// php string variable:
$content = "Somethin开发者_如何学Pythong in string........bla bla bala.......".
 while(.....){}
 ."agian string...";
echo $content;
// i am getting error => unexpected T_WHILE in my php....
No, you can't. But you can use a function :
function myFunction() {
    while(....) {
        ...
    }
    return $something;
}
$content = "Something in string........bla bla bala......." . myFunction() . "agian string...";
echo $content;
No. No, you can't.
Use string concatenation properly:
$content = "Start";
while (<something>) {
   $content .= "Middle";
}
$content .= "End";
No you can't do that but you could do this.
$content = "Something in string........bla bla bala.......";
while(.....){
    $content .= "agian string...";
}
echo $content;
No. You'll have to append in a loop:
$content = "Something in string........bla bla bala.......";
while ($i++ < 20) {
    $content .= 'something else';
}
$content .= 'something to end';
echo $content;
Don't know, what the while(...)-part should do, but implode() may help
 
         
                                         
                                         
                                         
                                        ![Interactive visualization of a graph in python [closed]](https://www.devze.com/res/2023/04-10/09/92d32fe8c0d22fb96bd6f6e8b7d1f457.gif) 
                                         
                                         
                                         
                                         加载中,请稍侯......
 加载中,请稍侯......
      
精彩评论