Quantcast
Channel: PHP Freaks: PHP Help
Viewing all articles
Browse latest Browse all 13200

Var inside a String var

$
0
0

hi everyone, I'm struggling with this code, I want to put inside a string a var sent by a submit. 

I need that the var $someone changes, to the right name. This is not working, how can i do this?

$layout='
<h2 class="title"><a href="#">Title</a></h2>
<p class="meta">bla bla bla by <a href="#">'.$someone.'</a></p>
<div class="entry">
</div>';

if($someone =="john")
    echo $layout;
else
    $someone ="mary";
    echo $layout;



thanks for the help.


Viewing all articles
Browse latest Browse all 13200

Trending Articles