denny3d
asked on
replace a variable from result of query mysql
Hello EE
into my php page i have a variable $owner
$owner = "pinco";
from a query of my db mysql i have a result like this:
"bla bla bla $owner bla bla bla"
i would print $owner of my result db whit value of variable of my page php.
where i wrong?
regards
Denis
into my php page i have a variable $owner
$owner = "pinco";
from a query of my db mysql i have a result like this:
"bla bla bla $owner bla bla bla"
i would print $owner of my result db whit value of variable of my page php.
where i wrong?
regards
Denis
ASKER
Hi Ray
dont work, i post my code:
into db i have this string: <p>Questo sito è di proprietà e viene gestito da $owner</p>
into my page i have this variable: $owner = 'pinco';
this is my code:
$sel_privacy = "SELECT id, titolo, body, FROM table";
$ris_privacy = mysql_query($sel_privacy);
$privacy = mysql_fetch_object($ris_pr ivacy);
echo'<h1>' . $privacy->titolo . '</h1>';
echo'<p>';
echo $privacy->body;
echo'</p>';
I have this result:
Questo sito è di proprietà e viene gestito da $owner
where i wrong?
regards
dont work, i post my code:
into db i have this string: <p>Questo sito è di proprietà e viene gestito da $owner</p>
into my page i have this variable: $owner = 'pinco';
this is my code:
$sel_privacy = "SELECT id, titolo, body, FROM table";
$ris_privacy = mysql_query($sel_privacy);
$privacy = mysql_fetch_object($ris_pr
echo'<h1>' . $privacy->titolo . '</h1>';
echo'<p>';
echo $privacy->body;
echo'</p>';
I have this result:
Questo sito è di proprietà e viene gestito da $owner
where i wrong?
regards
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
excellent
Outputs: bla bla bla pinco bla bla bla
Open in new window