freaker87 Posted January 16, 2012 Share Posted January 16, 2012 I have this script and i want to take this in one variable & print where i want is this possible if ($nro > 0) { echo "<table id='gridview' align='center'> <tr> <td bgcolor='#99CC00'>E.T.D.</td> <td bgcolor='#99CC00'>E.T.A.</td> <td bgcolor='#99CC00'>Quantity</td> </tr>"; $totqty=0; while ($row=mysql_fetch_array($result)) { $etd = $row['etd']; $etd = GetDateUserFormat($etd); $eta = $row['eta']; $eta = GetDateUserFormat($eta); $qty = $row['shptqty']; echo "<tr>"; echo "<td>" . $etd . "</td>"; echo "<td>" . $eta . "</td>"; echo "<td>" . $qty . "</td>"; echo "</tr>"; $totqty = $totqty + $qty; } $remqty = $styleqty - $totqty; echo "<br>"; echo "<tr>"; echo "<td bgcolor='#99CC00' colspan='2'> Total Entered Quantity</td>"; echo "<td>" . $totqty . " Kg.</td>"; echo "<td bgcolor='#99CC00'> Remaining Quantity</td>"; echo "<td>" . $remqty . " Kg.</td>"; echo "</tr>"; echo "</table>"; } Quote Link to comment https://forums.phpfreaks.com/topic/255132-all-script-in-one-variable-possible/ Share on other sites More sharing options...
RussellReal Posted January 16, 2012 Share Posted January 16, 2012 If you want, you could use file_get_contents and a relative url, not a remote url.. for example.. $content = file_get_contents('../code_repository/gridview.php'); and then $content will contain the content of the php file... Quote Link to comment https://forums.phpfreaks.com/topic/255132-all-script-in-one-variable-possible/#findComment-1308111 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.