Reply to Re: using php to populate a <ul

Your name:

Reply:


Posted by kerul4u on 11/30/38 11:28

hi,

First tell me is this function really works
--> Replace($TemplateText,"@$wohdisplayndx@",$woh_display);
or it is the function made by you !!?

Secondly if you use Function GetwohRS() function look wat happened
let say first date is "2002-09-01"
$woh_display .="<li> ".$wohdate."</li><br>"; will return
"<li>2002-09-01</li><br>"
you replace @$wohdisplayndx@ with
$TemplateText = Replace($TemplateText,"@$wohdisplayndx@",$woh_display);

say @$wohdisplayndx@ = @wohdate1@ and it is replaced by
"<li>2002-09-01</li><br>"

now next time say date is "2002-10-01"
and your $woh_display become
"<li>2002-09-01</li><br><li>2002-10-01</li><br>"
and your @wohdate2@ become
"<li>2002-09-01</li><br><li>2002-10-01</li><br>"
but I think this is not you want
cause you are using $woh_display .="<li> ".$wohdate."</li><br>";

the dummy example with your logic is here

<?
$TemplateText = "@woh_display1@ @woh_display2@ @woh_display3@
@woh_display4@";

$wohndx=0;
$ndx = 4;
while ($wohndx < 4)
{


$wohdate = "Mydata to show".$ndx;
$wohdisplayndx = 'woh_display'.$ndx ;



$woh_display ="<li> ".$wohdate."</li><br>";
$toreplace = "@".$wohdisplayndx."@";
$TemplateText = str_replace($toreplace,$woh_display,$TemplateText);

$wohndx++;
$ndx --;
}
echo $TemplateText;
?>

try this out and apply the same logic in your fuctions hope it may help
you..
Feel free to ask any questions

Kerul4u
[ProDesingz]

[Back to original message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация