|
Comments for: babao20020907
| Message # 1510212: |
|
Date: 08/30/07 05:50
By: scottybwoy Subject: Constuctive Critisism Function Dynamic Rows is rubbish, if you use different $prefix lengths (quite likely) it will most likely ruin your html template. All it needs is a strilen($prefix) and add that value to the lengths of your strpos calls. You can also rewrite your other func like this: function ReplaceStatic($LoadTemplate, $static_data) { $tcontent = $LoadTemplate; foreach ($static_data as $k => $v) { $placeMat = "<!--%$k%-->"; //echo "<br>$placeMat<br>$v"; $tcontent = str_replace($placeMat, $v, $tcontent); } return $tcontent; } And just pass one array as long as the key names match your place holders in the template happy coding ppl |
Previous Message | Next Message |


