kannu Posted March 27, 2009 Share Posted March 27, 2009 hey guys, i have a html output which comprises of various variables where there values change on user selection, and their combined result together is output in html as a string the following is the code <td><span id="custom_carat"><?=$row_prod['total_carat_weight']?></span> Carat <span id="center_diamond1"><? echo $default_diamond['shape']; ?></span> <?=substr(substr(stripslashes($row_prod['product_name']),11),0,-14) ?><span id="custom_gold1"><?=$default_gold['text']?></span> Gold </td> Is it possible that I can assign the entire output of the above to a php variable. if you can please let me know thanks Quote Link to comment Share on other sites More sharing options...
lonewolf217 Posted March 27, 2009 Share Posted March 27, 2009 this should work <?php $test = "<td><span id=\"custom_carat\">".$row_prod['total_carat_weight']."</span> Carat <span id=\"center_diamond1\">".$default_diamond['shape']."</span>". substr(substr(stripslashes($row_prod['product_name']),11),0,-14) ."<span id=\"custom_gold1\">".$default_gold['text']."</span> Gold </td>"; ?> Quote Link to comment Share on other sites More sharing options...
kannu Posted March 27, 2009 Author Share Posted March 27, 2009 man, thanks LoneWolf217, that worked like a charm, i was trying to figure it out for over 2 hours. thanks again Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.