September 20th, 2000, 11:19 PM
-
Hi there !!!
Is it possible to assign a whole function or block to a variable ???
eg.
<BLOCKQUOTE><font size="1" face="Verdana,Arial,Helvetica">code:</font><HR><pre>
<? if (db_num_rows($qid_p) == 0) { ?>
<li>No
<? } ?>
<? while ($prod = db_fetch_object($qid_p)) { ?>
<p><b><a href="product_details.php?id=<?=$prod->id?>"><? pv($prod->name) ?></a></b>
<br><? pv($prod->description) ?>
<br>$<? pv($prod->price) ?>
<br>[<a href="cart_add.php?id=<?=$prod->id?>">+ Add to Cart</a>]
<? } ?>
[/code]
How to assign this code to a unique variable ???
Regards,
marcoBR
September 21st, 2000, 06:31 AM
-
Don't quite understand what you're asking. Why not just use functions?
---JH