02-21-2011, 10:59 PM
|
#2 (permalink)
|
|
The Acquainted
Join Date: May 2008
Location: Québec
Posts: 104
Thanks: 10
|
Impressive, here is what I come back with from before your post.
how to implement it with a foreach loop.
Let says instead I use index 0 to give me the whole piece and I replace the whole string with anther with the "number" index 1 with the formated html. See code
PHP Code:
preg_match_all('/\*&([a-z0-9]+)&\*/i',$tache,$out, PREG_SET_ORDER); echo $out[0][0] . ", " . $out[1][0] . ", " . $out[2][0] . ", " . $out[3][0] . ", " . $out[4][0] . "\n"; $i = 0; foreach ($out[$i][0] as &$value) { $value = str_replace("*&","<div class=\"progress-containers\"><div style=\"width:",$value); $value = str_replace("&*","%\">$value[$i][1]</div></div>",$value); $i++; }
__________________
That's why we are not alone on earth... let's build !
|
|
|
|