php: fwrite a string with echo?

Toby L

New member
fwrite($newprofile, "echo '<div style=\"float:left; width:450px; padding-right:5px; padding-left:5px;\"><h1>(ucwords($info[2])) (ucwords($info[3]))</h1>';");

I want the out put to be:


echo '<div style=\"float:left; width:450px; padding-right:5px; padding-left:5px;\"><h1>(ucwords($info[2])) (ucwords($info[3]))</h1>';

Yet it always turns to:

echo '<div style=\"float:left; width:450px; padding-right:5px; padding-left:5px;\"><h1>(ucwords(Value1)) (ucwords(Value2))</h1>';

Basically, the variables become return their values instead of remaining $info[2] and $info[3]
Sorry, the desired and actual outputs are incorrect. Here it is:

Desired:
echo '<div style="float:left; width:450px; padding-right:5px; padding-left:5px;"><h1>(ucwords($info[2])) (ucwords($info[3]))</h1>';

Actual:
echo '<div style="float:left; width:450px; padding-right:5px; padding-left:5px;"><h1>(ucwords(Value2])) (ucwords(Value3))</h1>';
 
Back
Top